This is for a Desktop C# app in Visual Studio Express 2012.
I am using a webBrowser control to logon to various websites but find some do not respond and timeout.
I suspected it may be the webBrowser control inherently running IE7 but found the websites work fine on an old PC running IE7 as a native browser. Is there something in webBrowser I need to set to allow a website such as the one in the code below to process responses?
The code below navigates to a website I am having trouble with. If you enter any values for Login and Password in a native browser, it immediately responds and throws an error , but in a webBrowser it sits there waiting for a response and eventually times-out.
Any help would be greatly appreciated!
Mick
namespace WindowsFormsApplication11
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(
"https://www.my.telstra.com.au/myaccount/home?red=/myaccount/");
}
}
}
I worked often with the WenBrowserControl and can't really remember even one time I did not have any problems especially with the browermode of the control. Following were some steps that helped me solving many of these problems:
1) Force the application to use the InternetExplorer settings: First I suggest you try adding a registry key for your application under
HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
and
HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION`
with the value 9000
which forces the control in your application to use the IE9 settings.
Here you can find the question which brought me to this solution. Its described very detailed there.
2) Settings in Internet explorer: The timeout problem looks for me like some security feature of IE is blocking something. In my oppinion Internet Explorer has kinda srict regulations concerning content of websites. Try to add the websites that time out to the secure sites under the Internetsettings of IE. Try also to decrease the security / blocked features of the secure sites.
Please let me know if you got any further.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With