Just configured SSL but 'Windows Security' message box appears when trying to access the login page

Discussion in 'General troubleshooting' started by Carlos, Sep 10, 2013.

  1. Hi, I just obtained a trial SSL certificate, and I am trying to make it work at Winhost. I set the 'RequireSSL' to true in web.config file. However, when I try to access the login page a message box appears with the 'Windows Security' title asking me for credentials. I am not sure what kind of credentials are expected. This is supposed to be forms authentication, and do not know why the message is referring to windows. Can you please help?

    Thanks!
     
    Last edited by a moderator: Oct 14, 2015
  2. ComputerMan

    ComputerMan Winhost Staff

    Double check your web.config file and make sure you're using forms. It sounds like you're using Windows Authentication in your web.config settings.
     
  3. Thanks for your reply ComputerMan. My configuration has 2 web.config files. The one in my root directory defines the 'forms' authentication mode. I intended to have a protected folder that also has its own config file, and which I think is usng the authentication of its parent folder config file. When I test the site within Visual Studio it works fine. In other words, if I try to acces one of the pages within the protected folder it goes to the login page first. If I go to an unprotected page within the folder it also does so. However, this behavior changed when I included a SSL certificate. Now, if I go directly to the login page, I do not get the windows security prompt, but if I go to a page within the protected folder, the prompt appears. Normal flow would be to re-route the request to the login page. I really appreciate if you can help me with this. Thanks so much
     
  4. ComputerMan

    ComputerMan Winhost Staff

    Are you sure? Did you double check the settings in the web.config file hosted on your site?

    Can you check the web.config in the protected folder. The Installing an SSL Certificate doesn't change the settings of your site's code or how it works. It gets installed on the server and your site account gets a unique IP number. Thats the only thing that happens when installing an SSL Certificate. It doesn't change the way your site authenticates. There might be something in your web.config that you may have changed when adding the requirement for the secure connection on your site. Maybe try removing this requirement to see if it solves the issue.
     
  5. Thanks again for responding to this thread. This may look harder than it really is, but have not been able to figure it out, and I would like to resolve it soon.

    Here is the whole web.config in the protected folder:

    <?xml version="1.0"?>
    <configuration>
    <system.web>
    <authorization>
    <deny users="?" />

    </authorization>

    </system.web>

    <location path="<UnprotectedPage1.aspx">

    <system.web>

    <authorization>
    <allow users="*"/>

    </authorization>



    </system.web>

    </location>

    <location path="<UnprotectedPage2.aspx">

    <system.web>

    <authorization>


    <allow users="*"/>

    </authorization>
    </system.web>

    </location>


    </configuration>

    I am thinking that the '<deny users="?" /> for anonymous users is maybe causing it, and it
    has to do with a configuration in IIS. but I do depend on the proper administration from Winhost.

    Thanks again!
     
    Last edited by a moderator: Oct 14, 2015
  6. Can someone help out in configuring a site that has the aspmembersip provider alongside with a protected folder? It works with the configuration in my development environment but it asks for authentication when under Winhost. Here is my current configuration. In the root, I have:

    <authentication mode ="Forms">
    <forms name=".ASPXAUTHCookie"
    loginUrl="https://<sitename.com>/<protectedFolder>/Login.aspx"
    protection="All"
    timeout="30"
    path="/"
    requireSSL="true"
    slidingExpiration="true"
    cookieless="UseDeviceProfile" defaultUrl="<ProtectedFolder>/DefaultPage.aspx"
    />
    </authentication>

    in the folder that I intend to ask for authentication, I have:
    <?xml version="1.0"?>
    <configuration>
    <system.web>
    <authorization>
    <deny users="?" />

    </authorization>

    </system.web>

    <location path="<UnprotectedPage1.aspx">

    <system.web>

    <authorization>
    <allow users="*"/>

    </authorization>



    </system.web>

    </location>

    <location path="<UnprotectedPage2.aspx">

    <system.web>

    <authorization>


    <allow users="*"/>

    </authorization>
    </system.web>

    </location>


    </configuration>

    I appreciate it.
     
    Last edited by a moderator: Oct 14, 2015
  7. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015

Share This Page