Web Browser control defaults to IE7 with IE9 Installed - vb.net

I am writing an application in VB.Net that is using the standard Web Browser control. I went to YouTube.com with my application and the page had a message saying I was using IE7. I since have checked multiple places and thay all reported my application running IE7, but I have IE9 installed. I visited the same places using the standard installed web browser and the same web sites said I was using IE9. I assume in my application the Web Browser control is switching to IE7 compatability mode. I went to the reg and tried to add my application to the FEATURE_BEHAVIORS but this did not work and still said I was using IE7. When I tried the this I was running my application from VS2010 so I don't know but this may have been part of the problem of why the reg change had NO effect. My main question is, How do I get the Web Browser control to NOT run in compatablity mode as I develop the application in VS2010.
Vb.Net,Vista Home Premium Service Pack 2,Visual Studio 2010 Ultimate

The Actual Key is FEATURE_BROWSER_EMULATION and not FEATURE_BEHAVIORS
Here is Inno Setup script to enable this feature
[Setup]
AppName=Browser Patch
AppVersion=1.0.0.0
AppID={{D1A4934F-E67B-44CF-A8E2-07A8CFEDFAB3}
AlwaysRestart=false
ChangesEnvironment=true
OutputBaseFilename=Patch
PrivilegesRequired=admin
ShowLanguageDialog=no
DisableWelcomePage=True
DisableReadyPage=True
DisableReadyMemo=True
DisableFinishedPage=True
AllowCancelDuringInstall=False
CreateAppDir=False
DisableProgramGroupPage=yes
Uninstallable=no
SolidCompression=True
Compression=lzma2/ultra
InternalCompressLevel=ultra
CompressionThreads=2
UsePreviousAppDir=yes
ArchitecturesInstallIn64BitMode=x64
VersionInfoVersion=1.0.0.0
VersionInfoCompany=Company Name
VersionInfoDescription=Registry Patch
VersionInfoCopyright=Company Name
VersionInfoProductName=Company Name Registry Patch
VersionInfoProductVersion=1.0.0.0
AppPublisher=Your company name
[Registry]
;Current User
Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"
;Local Machine
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x270f"
;64 Bit Mode
Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"; Check: IsWin64

Related

Idempiere: 'External POS Integration' option not showing up in Menu

I am trying to setup Unicenta POS on my Windows 10 64 bit machine.
My configuration:
Idempiere server v5.1 (http://127.0.0.1:8080/)
ActiveMQ v5.15.2
(http://127.0.0.1:8161/)
POS Integration plugin (Available
here)
I followed instructions given Here. ActiveMQ is running fine, Unicenta can also send request to ActiveMQ, I can see that in Queues. Idempiere server is also running fine.
I installed POS integration plugin through Felix Web Console. It shows up in the list and It is active. But, that plugin doesn't show up in Idempiere Menu option. Either that plugin has some problems or I am missing something.
I also performed Role Access Update on GardenWorld Client Admin but that didn't change anything. Menu option is still missing.
Please help.
The real issue was that 2Pack did not Pack in into the Database. I had install 2Pack manually and Pack In in my SystemAdmin. After that I logged out and logged in with SuperUser credentials and with GardenAdmin role. And then menu item appeared!
2Pack zip file location - Download
How to Pack In:

'Bad Gateway' error when loading aspnetcore RC2 default website project

I am attempting to run the default ASP.NET Core Web Application (Web Application Template in VS 2015) via IIS.
I have followed the instructions from the docs here eg setting up a 'No Managed Code' application pool and pointing the Physical Path at the location of the web.config file.
When I attempt to browse to the website root, http://localhost I am getting this error:
HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request.
Most likely causes: The CGI application did not return a valid set of
HTTP errors. A server acting as a proxy or gateway was unable to
process the request due to an error in a parent gateway.
The event viewer states:
Failed to start process with commandline 'dotnet ./bin/Debug/netcoreapp1.0/WebApplication2.dll', Error Code = '0x80004005'.
This error shows I have replaced the placeholders
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%"
in web.config with the required values
<aspNetCore processPath="dotnet" arguments="./bin/Debug/netcoreapp1.0/WebApplication2.dll"
(update: these placeholders are replaced when you publish)
As per the troubleshooting instructions I have installed .NET Core Windows Server Hosting Bundle and restarted the server.
Running from the command line via dotnet works
Wondering what to try now.
Ok I figured my issue out. I am pointing the physical path in IIS to the unpublished Visual Studio project root directory. This works in previous versions of .net (ie non dotnet core aspnet projects) but doesnt now.
If you really want this to work then you have to publish your app to a temporary folder and copy the Microsoft.AspNetCore.* binaries back into the bin\Debug\ folder along with the refs and runtimes folders
This is a generic error for when IIS can't find the specified .NET Core components ,and doesn't know where to forward requests. In addition to following the official IIS publishing guide, make sure you have:
Installed the correct versions from the download page for latest .NET Core releases
Specified the correct library versions (explicitly or with wildcards) in your project.json
Included a web.config file (preferably using the publish-iis tool), and that the <aspNetCore> key values have been replaced with local values (source, with examples)
I ran into this while setting up a Core 1.0.0 (final) website on a new Windows 2008 Server. Turns out I had mixed up some of the installers from my dev machine with newer versions, and had mismatched library versions (RC2 vs final). Reinstalling the Server Hosting package fixed the problem.
The key to troubleshooting was to get into the console and use the dotnet commands (and resulting error messages) to iterate until I had my site running from the console, since the IIS error page in the browser was useless. I also found some benefit in a few entries in the system Error logs, but not much.

How to RDP from a web page

I'm trying to open an rdp session to a server from my web page.
<td>testrdp</td>
The .bat file just has the following line written in it:
mstsc /v:emea-cirrus
What happens is that the file just gets displayed in my chrome browser as a text file. So the web page just loads and literally says "mstsc /v:emea-cirrus" at the top. How can I get it to launch the remote desktop client and go to the address?
I have also tried making a .rdp file and referencing that is the href, which also just showed up as plain text. The RDP file was created using the following code:
screen mode id:i:2
desktopwidth:i:1436
desktopheight:i:925
session bpp:i:16
auto connect:i:1
full address:s:emea-orion
compression:i:1
keyboardhook:i:2
audiomode:i:2
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:1
bitmapcachepersistenable:i:1
winposstr:s:0,3,0,0,800,600
redirectclipboard:i:1
redirectposdevices:i:0
drivestoredirect:s:
autoreconnection enabled:i:1
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
allow desktop composition:i:0
allow font smoothing:i:0
disable cursor setting:i:0
gatewayhostname:s:
gatewayusagemethod:i:0
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0
You can create the .RDP file on the server side, which Windows should associate with Remote Desktop, and force the browser to download it (instead of displaying it). In PHP you would do it like this:
$file = 'screen mode id:i:2
desktopwidth:i:1436
desktopheight:i:925
session bpp:i:16
auto connect:i:1
full address:s:emea-orion
compression:i:1
keyboardhook:i:2
audiomode:i:2
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:1
bitmapcachepersistenable:i:1
winposstr:s:0,3,0,0,800,600
redirectclipboard:i:1
redirectposdevices:i:0
drivestoredirect:s:
autoreconnection enabled:i:1
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
allow desktop composition:i:0
allow font smoothing:i:0
disable cursor setting:i:0
gatewayhostname:s:
gatewayusagemethod:i:0
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0';
header("Content-Disposition: attachment; filename=filename.rdp");
header("Content-Type: application/rdp");
print $file;
exit();
I've used this technique before and it has worked well. The user will click the link, be prompted to save or open, and if they click open Remote Desktop will launch with the settings specified.
Example for .NET in particular ASP.MVC
public FileResult RDP() {
MemoryStream memoryStream = new MemoryStream();
TextWriter tw = new StreamWriter(memoryStream);
tw.WriteLine("screen mode id:i:2");
tw.WriteLine("use multimon:i:0");
///The rest of the file
memoryStream.Position = 0;
return File(memoryStream, "application/rdp", "conenction.rdp");
}
May I suggest the use of a browser based RDP client? You have open source choice nowadays, from Guacamole FreeRDP-WebConnect if you have Linux servers or Myrtille for Windows. There are also commercial software, with more features (it depends on your needs) like 2X RDP client or LogMeIn.
For security reasons, you can't simply run a batch file via a link from any modern browser.
You can get this to work if you wrap the call to the batch file in a VBScript and run it via the shell. However, you'll need to open up your ActiveX permissions to have IE permit this.
For an example of how to do this, see here.

IIS 6.0 Default webpage won't work

In IIS 6.0 running on a server 2003 r2 the default webpage can't be found, but if I change the url to specifically go to the default page it works.
i.e. website.com doesn't work when defaultwebsite.html is set as the default website, but website.com/defaultwebsite.html works.
I've done simple stuff like enabled default content page and reset iis, but I'm not too familiar with it.
I have another website that works just fine that I compared the settings to. The only difference is that it is running on 32 bit and this new one is 64 bit. Are there any settings in particular that need to be changed or added to get the same functionality?
This fixed it:
In the Windows registry, open the following node: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0
Create a new DWORD value named EnableExtensionlessUrls.
Set EnableExtensionlessUrls to 0. This disables extensionless URL behavior.
Save the registry value and close the registry editor.
Run the iisreset command-line tool, which causes IIS to read the new registry value.
Make sure if you're on a 64 bit system that in the registry you are under the Wow6432Node and not just SOFTWARE:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls

Deploy WCF REST 4.0 to XP IIS 5?

I am trying to deploy a simple "Hello World" .NET 4.0 REST-style WCF service on WinXP (IIS5). It works fine in Cassini.
I tried to adapt the info here to me:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
but something is not clicking. Can anyone lend ideas or comments? Yes, I must stay with WinXP.
Thanks.
After a fair amount of struggling I was able to successfully deploy a WCF 4.0 REST web service on XP/IIS5. For the benefit of you and others in the same situation, here's what I did (let me know if you need more detail):
Using VS 2010, build a deployment
package for the project and then
install it on the target machine
(your web server). The following
link will show you how to do this: http://vishaljoshi.blogspot.com/2009/03/web-packaging-installing-web-packages.html
Make sure that your virtual directory in IIS is configured to use .NET 4 (right click on virtual directory > properties > ASP.NET tab > ASP.NET Version)
Configure your virtual directory to support extensionless requests (i.e. your REST API) by creating a wildcard mapping (right click on virtual directory > properties > configuration > mappings tab) with the following properties:
Executable: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
Extension: .*
Check that file exists: unchecked
(Note: watch out for the bug that keeps the "OK" button on this dialog grayed out. To get around this just click in the executable textbox after entering your extension and the "OK" button should get enabled).
If you get an authentication error when accessing the service then turn off integrated authentication on the virtual directory. This should fix the problem if you have used the defaults in the generated web.config of your service. If you have explicitly modified the authentication mode then you will have to adapt accordingly.
Have you considered self-hosting your service instead of trying to use IIS. That will probably be easier to do than use IIS.
In case above steps dont work. There could be a problem with permissions on your App pool for that website / virtual directory , you can try to set that right and try it out.
You can refer this article for more help on this.
http://technicalwizardry.blogspot.in/2013/04/wcf-rest-service-hosted-on-iis-5.html#!/2013/04/wcf-rest-service-hosted-on-iis-5.html