Authentication forms and SSL on the login page

Discussion in 'ASP .Net Security' started by Alexio, Nov 24, 2003.

  1. Alexio

    Alexio Guest

    Hi all,
    I'm tryiing to set up security for a ASP.NET web application in order to
    force all the users to go to a login page with an SSL connection. After the
    authentication the users would go to the original page they are looking for
    without SSL encrpytion.

    So the flow should be:

    1. user go to http://myserver/page1.aspx
    2. user is redirect to https://myserver/login.aspx by the form
    authentication
    3. user insert its credentials in the login.aspx and submit to the server
    4. the web server authenticates the user and redirect him to
    http://myserver/page1.aspx

    Obviously everything is working fine if I remove the SSL on the step 2.

    I get the following error between the steps 1 and 2 (just after I click
    'yes' in order to accept the certificate that it was created in a fake PKI):

    Server Error in '/WebApplication1' Application.
    ----------------------------------------------------------------------------
    ----

    Access is denied.
    Description: An error occurred while accessing the resources required to
    serve this request. The server may not be configured for access to the
    requested URL.

    Error message 401.2.: Access is denied because of the Web server's
    configuration. Contact the Web server's administrator for help.

    In the web.config I put these lines:

    <authentication mode="Forms">
    <forms name="ProgAspNetCookie" protection="All"
    timeout="20"
    path="/" loginUrl="https://localhost/WebApplication1/WebForm1.aspx"
    />
    </authentication>

    <authorization>
    <deny users="?" />
    </authorization>

    If the loginUrl is changed to "WebForm1.aspx" everything works fine (as said
    before).

    Any suggestion?

    TIA
    Alexio
     
    Alexio, Nov 24, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Saunders

    Re: Forms authentication login page

    John Saunders, Aug 28, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    783
    Jerry III
    Aug 29, 2003
  2. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    754
    Hermit Dave
    Jan 13, 2004
  3. Eric
    Replies:
    2
    Views:
    1,765
    Tommy
    Feb 13, 2004
  4. John Smith
    Replies:
    0
    Views:
    523
    John Smith
    Oct 5, 2006
  5. Pascal Blanchard
    Replies:
    0
    Views:
    391
    Pascal Blanchard
    Aug 17, 2004
  6. Pascal Blanchard
    Replies:
    1
    Views:
    413
    Pascal Blanchard
    Aug 18, 2004
  7. Keltex
    Replies:
    1
    Views:
    548
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  8. Eric
    Replies:
    2
    Views:
    906
Loading...