I am using .NET 4 and trying to use the desktop authentication via the web-browser control (WPF and/or WinForms; StackApp NNTP bridge for accessing StackExchange forums (like StackOverflow)). It seems that the login cannot be done, because the web browser hangs up, after the page from "StackExchange Login" is displayed. I use the following URL: https://stackexchange.com/oauth/dialog?client_id=1736&scope=no_expiry&redirect_uri=https://stackexchange.com/oauth/login_success
Edit: Looking at the callstack of the hang, it seems that it hangs in an endlessloop in JavaScript of the page. So the desktop-authetntication is not usable for Windows applications!
It works in the normal IE browser, but not in a WinForms or WPF window... Does anyone know what the problem is?
It is simple to repoduce:
- Create a WinForms-Project
- Add the "WebBrowser" control to the dialog
- Double-Click on the Form1
Add the following code
private void Form1_Load(object sender, EventArgs e) { webBrowser1.Navigate("https://stackexchange.com/oauth/dialog?client_id=1736&scope=no_expiry&redirect_uri=https://stackexchange.com/oauth/login_success"); }
Start the application
- Login by pressing the "login with Stack Exchange" account symbol
- A new page gets loaded; it is displayed correctly, but you cannot enter your login name; the window hans...
Has anyone used the desktop-URL inside a desktop-application under Windows? It seems that I am the first one.... and the page has some JavaScript bugs...
FEATURE_BROWSER_EMULATION
setting for IE for my application, but that seems to help nothing. I don't have much rep here, so my bounty is small. :)