Problems with form authentication

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

  1. #1

    Default Problems with form authentication

    I'm experiencing some problems with role-based forms authentication accross
    domain.
    I wanted to create an unique login page for multiple web server running
    different applications.
    My first server is [url]www.mydomain.com[/url]
    The second one is www1.mydomain.com
    The third one is www2.mydomain.com
    I made a login.aspx page on [url]www.mydomain.com[/url] and set all web.config so that
    the user is redirected to this unique page. All the machineKey have been set
    to the same value on each server.
    The authentication cookie domain is ".mydomain.com" and everything is
    working fine. When I log in on the first server, I can navigate through each
    servers.
    My problem is that when I want to log off, I need to delete the
    authentication cookie. The cookie is not persistent and is set to expire
    after 20 minutes but i want to enforce the deletion. I tried to use the
    FormsAuthentication.SignOut() Method but it would not delete a cookie
    generated across the full domain (this method work fine if I set my cookie
    domain to [url]www.mydomain.com[/url] but then i can't share it accross my
    applications). I tried to remove the cookie from the request or from the
    response using Request.Cookies or Response.Cookies collections but nothing
    happens.

    The only solution I found was to create a new authentication cookie which
    domain is ".mydomain.com" and in which I store an non-existent user with an
    incorrect role and to send it to the client. The previous cookie seems to be
    overwrited and as the information stored in my authentication cookie are
    irrelevant, the user is sent back to the login page. I was wondering if
    there was any more satisfaying solution.

    Thanx for any help.

    Martin.


    Martin Guest

  2. Similar Questions and Discussions

    1. Form Authentication Ticket
      I've read some books and online articles on how to implement form authentication. Some taught me just to do...
    2. Form Authentication with SSL
      If I use form authentication with SSL with my web application, when I access my login page, I will go to https://www.mydomainname.com/login.aspx....
    3. Form Authentication
      Hello everyone, I have found a problem with form authentication method that I can't solve. The problem is: I want to use a form authentication...
    4. authenticate win32 form client with form based authentication web services
      (Type your message here) -------------------------------- From: kitchai yong Hi, Can you tell me how i authenticate the win32 form client...
    5. Form Field/ Form Submit Problems (probably an easy answer...)
      Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works...
  3. #2

    Default Problems with form authentication

    Try to change your authentication cookie domain
    from ".mydomain.com" to "mydomain.com" or only "mydomain"

    /Fredrik Normén NSQUARED2

    >-----Original Message-----
    >I'm experiencing some problems with role-based forms
    authentication accross
    >domain.
    >I wanted to create an unique login page for multiple web
    server running
    >different applications.
    >My first server is [url]www.mydomain.com[/url]
    >The second one is www1.mydomain.com
    >The third one is www2.mydomain.com
    >I made a login.aspx page on [url]www.mydomain.com[/url] and set all
    web.config so that
    >the user is redirected to this unique page. All the
    machineKey have been set
    >to the same value on each server.
    >The authentication cookie domain is ".mydomain.com" and
    everything is
    >working fine. When I log in on the first server, I can
    navigate through each
    >servers.
    >My problem is that when I want to log off, I need to
    delete the
    >authentication cookie. The cookie is not persistent and
    is set to expire
    >after 20 minutes but i want to enforce the deletion. I
    tried to use the
    >FormsAuthentication.SignOut() Method but it would not
    delete a cookie
    >generated across the full domain (this method work fine
    if I set my cookie
    >domain to [url]www.mydomain.com[/url] but then i can't share it
    accross my
    >applications). I tried to remove the cookie from the
    request or from the
    >response using Request.Cookies or Response.Cookies
    collections but nothing
    >happens.
    >
    >The only solution I found was to create a new
    authentication cookie which
    >domain is ".mydomain.com" and in which I store an non-
    existent user with an
    >incorrect role and to send it to the client. The
    previous cookie seems to be
    >overwrited and as the information stored in my
    authentication cookie are
    >irrelevant, the user is sent back to the login page. I
    was wondering if
    >there was any more satisfaying solution.
    >
    >Thanx for any help.
    >
    >Martin.
    >
    >
    >.
    >
    Fredrik Normén NSQUARED Guest

  4. #3

    Default Re: Problems with form authentication

    It doesn't change anything. Any other idea ?



    "Fredrik Normén NSQUARED" <fnormen@hotmail.com> a écrit dans le message de
    news:15a501c38277$59335000$a101280a@phx.gbl...
    Try to change your authentication cookie domain
    from ".mydomain.com" to "mydomain.com" or only "mydomain"

    /Fredrik Normén NSQUARED2

    >-----Original Message-----
    >I'm experiencing some problems with role-based forms
    authentication accross
    >domain.
    >I wanted to create an unique login page for multiple web
    server running
    >different applications.
    >My first server is [url]www.mydomain.com[/url]
    >The second one is www1.mydomain.com
    >The third one is www2.mydomain.com
    >I made a login.aspx page on [url]www.mydomain.com[/url] and set all
    web.config so that
    >the user is redirected to this unique page. All the
    machineKey have been set
    >to the same value on each server.
    >The authentication cookie domain is ".mydomain.com" and
    everything is
    >working fine. When I log in on the first server, I can
    navigate through each
    >servers.
    >My problem is that when I want to log off, I need to
    delete the
    >authentication cookie. The cookie is not persistent and
    is set to expire
    >after 20 minutes but i want to enforce the deletion. I
    tried to use the
    >FormsAuthentication.SignOut() Method but it would not
    delete a cookie
    >generated across the full domain (this method work fine
    if I set my cookie
    >domain to [url]www.mydomain.com[/url] but then i can't share it
    accross my
    >applications). I tried to remove the cookie from the
    request or from the
    >response using Request.Cookies or Response.Cookies
    collections but nothing
    >happens.
    >
    >The only solution I found was to create a new
    authentication cookie which
    >domain is ".mydomain.com" and in which I store an non-
    existent user with an
    >incorrect role and to send it to the client. The
    previous cookie seems to be
    >overwrited and as the information stored in my
    authentication cookie are
    >irrelevant, the user is sent back to the login page. I
    was wondering if
    >there was any more satisfaying solution.
    >
    >Thanx for any help.
    >
    >Martin.
    >
    >
    >.
    >

    Martin Guest

  5. #4

    Default Re: Problems with form authentication



    I have exactly the same problem.

    I created a “single sign on” for multiple asp.net web applications
    running under subdomains by writing the authentication cookie using the
    parent domain name. However I can no longer log off within the
    subdomains using FormsAuthentication.SignOut call.

    I am guessing the signout might be defaulting to the subdomain in the
    current url and cannot find the authentication ticket that used the
    parent domain. Is there a method to set the parent domain name into the
    FormsAuthentication.SignOut process?

    Were you able to resolve this problem?


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    ARF F 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