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. Advertising

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. Eric
    Replies:
    2
    Views:
    1,528
    Tommy
    Feb 13, 2004
  2. Pascal Blanchard
    Replies:
    0
    Views:
    258
    Pascal Blanchard
    Aug 17, 2004
  3. Pascal Blanchard
    Replies:
    1
    Views:
    294
    Pascal Blanchard
    Aug 18, 2004
  4. Keltex
    Replies:
    1
    Views:
    419
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Eric
    Replies:
    2
    Views:
    595
Loading...

Share This Page