Sharing Authentication cookies between 1.0 and 1.1

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

  1. #1

    Default Sharing Authentication cookies between 1.0 and 1.1

    Hello all,

    I am having a problem getting two IIS applications to
    share a single authentication cookie. One app uses the
    1.0 Framework and other uses the 1.1 version. (This is on
    Windows 2000 Advanced Server)

    I already removed the "isolateapps" option from my 1.1
    machine.config and made sure 1.0 and 1.1 are using the
    same explicit <machinekey> (not AutoGenerate). I also
    tried putting an identical <machinekey> in both web.config
    files to no avail.

    The login screen is in the 1.1 app and works fine as long
    as I stay within that app. Whenever I try to move to the
    1.0 application (within a nested virtual directory) the
    authentication fails and I get redirected back to the
    login screen endlessly.

    Anyone know what I might be missing? I tried moving the
    1.0 app to 1.1 but then I get the javascript error
    mentioned in [url]http://support.microsoft.com/default.aspx?[/url]
    id=818803 (I installed to hotfix but it didn't fix it for
    me)

    Thanks for you help!
    Mike
    Mike LeBlanc Guest

  2. Similar Questions and Discussions

    1. Creating Cookies or Variables for Authentication
      Hope someone can help on this! I have been charged with revamping the online presence for a magazine. Aside from the public access for the site,...
    2. Forms authentication / cookies
      Hi! I'm just curious about the use of cookies in forms authentication. The username and roles are stored in the encrypted cookie, but if a user...
    3. Sharing authorization/authentication between Classic ASP and ASP.NET pages?
      I have an administrative website that I've built that needs to incorporate both Classic ASP and ASP.NET pages. The site needs basic password...
    4. Problem with Forms Authentication cookies
      Hi, We're having an issue with Forms Authentication cookies being treated as expired / invalid, and being deleted. This is causing our intranet...
    5. Authentication cookies and Web services
      Hey. This is a newbie Q on web service authentication. I'm using a web service behavior to call a web service from the browser. This user has...
  3. #2

    Default RE: Sharing Authentication cookies between 1.0 and 1.1

    Hi Mike,

    In order to share the authentication cookie across your applications the
    cookie path should be "/" (this is the default value if you don/t specify
    it in the web.config files). The cookie name should also be the same in all
    the applications. For instance, in the following example, I have 2
    applications configured for Forms Authentication. Each of them has a
    web.config file pointing to the "/LoginApp" application, where the user
    will log in.

    -LoginApp
    -app1
    -app2

    The "/LoginApp" application contains the login.aspx page (see attached)
    and the following web.config:
    << File: login.aspx >>
    <configuration><system.web>
    <authentication mode="Forms" >
    <forms name="MyAuthCookie" >
    <credentials passwordFormat = "Clear">
    <user name="foo" password="bar" />
    </credentials>
    </forms>
    </authentication>
    </system.web></configuration>

    Each of the applications "/app1" and "/app2" contains the following
    web.config:

    <configuration><system.web>
    <authentication mode="Forms" >
    <forms name="MyAuthCookie" loginUrl = "/LoginApp/login.aspx" >
    </forms>
    </authentication>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web></configuration>

    If the user is authenticated after requesting the page
    [url]http://server/app1/t.aspx[/url] then he can access the second application
    ([url]http://server/app2/t.aspx[/url]) without having to authenticate himself again.

    Hope this helps.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided ¡°as is¡± with no warranties and confers no rights.


    Tian Min Huang Guest

  4. #3

    Default RE: Sharing Authentication cookies between 1.0 and 1.1

    Thanks for the reply but I already did that.

    Both applications have their path set to "/" explicitly
    and have the exact same cookie name. If I set both
    applications to use 1.1 or 1.0 it works beautifully but if
    one is 1.1 and the other is 1.0 it quits working.

    The issue is actually resolved for me because I was able
    to get the javascript bug Hotfix working finally.
    (However it did introduce a new bug with Validator
    controls that Microsoft is currently working on).

    It's now a matter of curiosity...

    Thanks,
    Mike
    >-----Original Message-----
    >Hi Mike,
    >
    >In order to share the authentication cookie across your
    applications the
    >cookie path should be "/" (this is the default value if
    you don/t specify
    >it in the web.config files). The cookie name should also
    be the same in all
    >the applications. For instance, in the following example,
    I have 2
    >applications configured for Forms Authentication. Each of
    them has a
    >web.config file pointing to the "/LoginApp" application,
    where the user
    >will log in.
    >
    > -LoginApp
    > -app1
    > -app2
    >
    > The "/LoginApp" application contains the
    login.aspx page (see attached)
    >and the following web.config:
    > << File: login.aspx >>
    > <configuration><system.web>
    > <authentication mode="Forms"
    >
    > <forms
    name="MyAuthCookie" >
    > <credentials
    passwordFormat = "Clear">
    > <user name="foo"
    password="bar" />
    > </credentials>
    > </forms>
    > </authentication>
    > </system.web></configuration>
    >
    > Each of the applications "/app1" and "/app2"
    contains the following
    >web.config:
    >
    > <configuration><system.web>
    > <authentication mode="Forms"
    >
    > <forms
    name="MyAuthCookie" loginUrl = "/LoginApp/login.aspx" >
    > </forms>
    > </authentication>
    > <authorization>
    > <deny users="?" />
    > </authorization>
    > </system.web></configuration>
    >
    >If the user is authenticated after requesting the page
    >[url]http://server/app1/t.aspx[/url] then he can access the second
    application
    >([url]http://server/app2/t.aspx[/url]) without having to
    authenticate himself again.
    >
    >Hope this helps.
    >
    >Regards,
    >
    >HuangTM
    >Microsoft Online Partner Support
    >MCSE/MCSD
    >
    >Get Secure! ¨C [url]www.microsoft.com/security[/url]
    >This posting is provided ¡°as is¡± with no warranties and
    confers no rights.
    >
    >
    >.
    >
    Mike LeBlanc 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