1

I'm trying to login to instagram with c# webbrowser. But the login page is not loading. There is only a blank page.

By the way, my internet explorer opens the page.

private void Form1_Load(object sender, EventArgs e)
{
  webBrowser1.Navigate("https://instagram.com/accounts/login/");
}

This brings only a blank page. I think instagram find a way to block logins with webbrowser. What do you suggest?

These are the errors I'm getting while page loading.

unable to get property stringify of undefined or null reference object doesn't support this property or method replaceState

enter image description here enter image description here

digiogi
  • 260
  • 1
  • 9

1 Answers1

2

well these are only some guesses so cannot be sure. if you can give more information such as error etc.

  1. first and most likely webbrowser does not support src="**//**domain.com" protocol. notice the url does not start with http or https as a work around try update it with http://domain.com
  2. some jquery is not supported it says 1.7 but might be some problem with webbrowser.
  3. AJAX requests are blocked by webbrowser.
  4. also if you realy think it is blocked by instagram try changing useragent header of the webBrowser

I suggest use ScriptErrorsSuppressed property and error handling event to get more information about the error (if there is one)

Edit: Good news is I am able to replicate your problem with IE11 (Document Mode = IE7) I got exactly same error with the SSs also tried IE8 it did not work either so you need to force WebBrowser control to emulate as IE9 at least and to do that you need the update some registry keys luckily there are two great SO answers for that. 1 2 also just saw this one as well

Give them a try and see what happens.

Community
  • 1
  • 1
Onur Topal
  • 3,042
  • 1
  • 24
  • 41
  • I think it might me related to what you said at at first. Yes, I see there is without https protocol codes. And How can I correct these on source code? Or make it to be understand by webbrowser? @Onur TOPAL – digiogi Oct 27 '14 at 22:55
  • I've added screenshoots. Script errors looks like it understands two slash urls. – digiogi Oct 28 '14 at 09:28
  • 1
    @digiogi please check my updated answer hope it helps. – Onur Topal Oct 28 '14 at 11:11
  • Wow the version thing really worked like a charm. Thank you very much for helping me bro. @OnurTopal – digiogi Oct 28 '14 at 12:46