Search code examples
c#winformswebbrowser-controlwindows-security

WinForm with WebBrowser control pops Windows Security for Authentication


I have created (using C#, VS2017, windows10 latest updates) a simple Windows Form application and included a webBrowser control redirecting to a page.

I am having the Windows Security pop up asking for password and I want to disable it :

  • I want this application to work without human interaction
  • The authentication through this pop up is not working
  • It blocks further page loading and other application procedures.

Here is a screenshot : enter image description here

How can I stop this from appearing ? Is it poping from my windows or from the application it self ?

Thank you in advance.


Solution

  • According to this, here is how to solve the problem (for future questionnaires) :

    1. Open Edge
    2. Select the "..." and then open to Internet Explorer
    3. From Internet Explorer go : tools("gear")->Internet Options->Security
    4. Then select custom level
    5. From the settings deselect "logon in Intranet" and select "Anonymous logon"

    Why that happened :

    Probably it detects "saml.company"and considers it as intranet. Both WebBrowser control and the Edge, seem to inherit setting from Internet Explorer. And that seems to be the reason that causes that.