Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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:

  1. Create a WinForms-Project
  2. Add the "WebBrowser" control to the dialog
  3. Double-Click on the Form1
  4. 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");
    }
    
  5. Start the application

  6. Login by pressing the "login with Stack Exchange" account symbol
  7. 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...

share|improve this question
    
Maybe refactor this as a .net question on Stack Overflow? –  Brock Adams Jul 26 '13 at 23:15
    
I asked the question on stackoverflow.com/questions/17895156/net-4-webbrowser-hangs/… ...it seems that it is a Problem with the Java script... so it is a problem with the StackApp-Authentication... where is the right place to ask for Support for Desktop-Authentication? –  Jochen Kalmbach Jul 27 '13 at 17:24
    
This is the right spot for the SA authentication part, but I had thought it might be more of a .net issue. –  Brock Adams Jul 27 '13 at 19:02
    
Is anyone able to reproduce this issue? –  Jochen Kalmbach Jul 28 '13 at 16:53
    
It may take a while. Of the few that frequent this site, even fewer are .net users. (I avoid MS products like the plague). –  Brock Adams Jul 28 '13 at 17:44
    
The problem is not primarily .net; the main problem is embbeded IE with the specific JavaScript in the web page... this also might happen for non-.BET apps (like MFC).... but you are right: The problem is Windows with embedded IE browser and the particulary JavaScript in the page... –  Jochen Kalmbach Jul 28 '13 at 18:41
    
I am also seeing this on Windows 8.1 with Internet Explorer 11. I am trying to call the StackExchange API from PowerShell, and it is hanging at the "Authorizing Application" screen. –  Trevor Sullivan Dec 24 '13 at 2:34
add comment

You must log in to answer this question.

Browse other questions tagged .