Forms Authentication and SSL

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Forms Authentication and SSL

    Hi, I read some posts here, but I haven't found the full solution of my
    problem.

    I,ve configured my web application to use SSL with Server Certificates
    (Tested and works).

    Only one subfolder (/secure) of my webapp works with SSL. (Tested and works)

    Web.Config
    authentication mode="Forms">
    <forms loginUrl="/secure/login.aspx" protection="All" timeout="30"
    requireSSL="true">
    ......

    The users search a page of my webapp (example:
    "http://myserver/mywebapp/webform1.aspx") on a non secure SSL channel.
    If the user isn't authenticated, he will be redirected to the loginUrl. The
    problem is that he will not be redirected with the https:// prefix, so he
    has to manually change the address in from http:// to [url]https://.[/url]

    I've tried putting the full address in the loginUrl, like
    loginUrl="https://myserver/mywebapp/secure/login.aspx", but in this case,
    when redirecting on the login.aspx, I receive an Access denied Error
    (401.2).

    I've tried to configure IIS security, with anonimous access only, windows
    authentication, both, but nothing changes.

    So, the question is simple: how can I redirect a user to a SSL login page
    when he isn't authenticated, don't matter if he comes from an http:// or
    https:// address
    Thank you in advance

    Marco Roello
    [email]marco.roello@cnrservice.it[/email]



    How can I configure my app




    Marco Roello Guest

  2. Similar Questions and Discussions

    1. Accessing htm files without authentication (forms authentication)
      I have application with forms authentication. All works fine. When user opens .aspx file gets login form, login and then get the .aspx page. But...
    2. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    3. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    4. Authentication ticket, cookieless, forms authentication?
      Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the...
    5. Forms authentication with Windows authentication
      Hi, I have an ASP.NET web site that uses IIS Basic Authentication and accesses an OLAP Server at various stages. The OLAP Server authentication...
  3. #2

    Default Forms Authentication and SSL

    I'm using Forms Authentication, the user may come from a HTTP page, the
    login page is using SSL, so after logging in the user will be redirected
    back to a non SSL page.

    This used to work without any warnings. Suddenly after entering the login
    information IE is warning the user that they are being redirected to a non
    secure page.

    What is causing this?

    If I change the login page to non ssl (just HTTP) then I don't get the
    problem.

    How can I use SSL for the login page and not prompt the user when they are
    being redirected?

    Thanks.

    --
    Michael Tissington
    [url]http://www.tabtag.com[/url]
    [url]http://www.oaklodge.com[/url]



    Michael Tissington Guest

  4. #3

    Default RE: Forms Authentication and SSL

    Hi Michael,

    From security consideration, IE will prompt us this security alert either
    when we enter into a secure website from a non-secure one, or vice versa.
    To my knowledge, we cannot dismiss this alert, unless we check the "In the
    future, do not show this warning" checkbox.

    This security alert is very useful in the case if we want to send out our
    secret information, such as credit account number, password, over internet.
    With this alert, we should be notified whether the web site we are
    communicating is a real secure or valid web site before sending out the
    secret information. Without this security alert, we have no sense whether
    the web site is secure.

    Does it answer your question? If I have misunderstood your concern, please
    feel free to let me know.

    Best regards,

    Jacob Yang
    Microsoft Online Partner Support
    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "as is" with no warranties and confers no rights.

    Jacob Yang [MSFT] Guest

  5. #4

    Default Re: Forms Authentication and SSL

    Jacob,

    Yes, it partly answers my question.

    The other aspect of this is how do I use forms authentication with SSL

    Consider the following

    1) User views a non SSL page
    2) Clicks on a link which requires forms authentication
    3) Web.config points to a https page for the login information
    4) Using SSL the login information is collected
    5) How then does the redirection back to the refering page work?
    is it SSL or the original protocol - can it be specified?

    Basically we are are just wanting to collect the user information using SSL
    and then return to the protocol that was using when the user clicked on the
    link (which may or may not be https)

    Thanks.

    --
    Michael Tissington
    [url]http://www.tabtag.com[/url]
    [url]http://www.oaklodge.com[/url]


    "Jacob Yang [MSFT]" <jiany@online.microsoft.com> wrote in message
    news:TF$S48GmDHA.576@cpmsftngxa06.phx.gbl...
    > Hi Michael,
    >
    > From security consideration, IE will prompt us this security alert either
    > when we enter into a secure website from a non-secure one, or vice versa.
    > To my knowledge, we cannot dismiss this alert, unless we check the "In the
    > future, do not show this warning" checkbox.
    >
    > This security alert is very useful in the case if we want to send out our
    > secret information, such as credit account number, password, over
    internet.
    > With this alert, we should be notified whether the web site we are
    > communicating is a real secure or valid web site before sending out the
    > secret information. Without this security alert, we have no sense whether
    > the web site is secure.
    >
    > Does it answer your question? If I have misunderstood your concern, please
    > feel free to let me know.
    >
    > Best regards,
    >
    > Jacob Yang
    > Microsoft Online Partner Support
    > Get Secure! ¨C [url]www.microsoft.com/security[/url]
    > This posting is provided "as is" with no warranties and confers no rights.
    >

    Michael Tissington Guest

  6. #5

    Default Re: Forms Authentication and SSL

    Hi Michael,

    Is the login form (SSL required) in the same web application or virtual
    folder?

    With FormsAuthentication.RedirectFromLoginPage method, we can't specufy the
    protocol or get the source protocol from From FormsAuthentication object.

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139