Single signon (with FormsAuth) for mutliple web apps

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

  1. #1

    Default Single signon (with FormsAuth) for mutliple web apps

    I'm working on single signon for multiple web apps on a single domain. If I
    authenticate in wepApp1 then I am authenticated in webApp2 however, anywhere
    in the global.asax code of webApp2 the following don't seem to be
    set/initialized:
    Request.IsAuthenticated
    User.Identity
    The authentication cookie is available in webApp2's global.asax and once
    a form is loaded (i.e. I'm on a pageload event) the values of
    Request.IsAuthenticated and User.Identity are available.

    So why would the values of user identity and IsAuthenticated not be
    avaialble in the global.asax of webApp2?


    Thanks


    Brad



    Brad Guest

  2. Similar Questions and Discussions

    1. Single external signon with Integrated Auth apps and regular webs
      Hi, Well, after reading all of the posts in here, I'm still not quite sure if what I would like is possible. Here's my scenario: IIS5 (or 6 if...
    2. SSO (Single Sign On) for multiple PHP apps
      We have multiple PHP apps running on different servers. We have an LDAP authentication based (today) on the apache .htpasswd file which obliged...
    3. FormsAuth and Sessions Troubles...
      I'm having some trouble implementing Forms Authentication and using Session variables... If i just turn on Forms Auth and don't set up any roles...
    4. Web enabled apps/Thin client apps
      I'm writing an article and I need your informed opinions, so I ask you this: 1. Doesn't the web-enabled app generally run slower for one reason or...
    5. How To Disable Startup/Signon Screen
      Does anyone have a quick fix for eliminating the annoying start up screen (the one that asks for a login name and password) before WinXP desktop...
  3. #2

    Default Re: Single signon (with FormsAuth) for mutliple web apps

    In terms of your code, both of your assemblies (one for each we application)
    are completely separate. One assembly doesn't get to read from the other,
    even though they are in the same App Domain. The ability to read the cookie
    by both essentially serves as the cross-assembly communication mechanism
    (visualize it as serving a similar function to named pipes); others are
    available, but this is probably the easiest.

    One solution I have implemented is to create a custom logon page that looks
    for a cookie that indicates authentication. If I find a valid cookie, then I
    go ahead and set up that user as authenticated and return to the page that
    requested the authentication. If I don't, then I display the page as normal
    and have them enter their user/pass.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows XP
    Windows XP Associate Expert
    --
    "Brad" <nospam@co.lane.or.us> wrote in message
    news:%23SiEhvtgDHA.3828@tk2msftngp13.phx.gbl...
    > I'm working on single signon for multiple web apps on a single domain. If
    I
    > authenticate in wepApp1 then I am authenticated in webApp2 however,
    anywhere
    > in the global.asax code of webApp2 the following don't seem to be
    > set/initialized:
    > Request.IsAuthenticated
    > User.Identity
    > The authentication cookie is available in webApp2's global.asax and
    once
    > a form is loaded (i.e. I'm on a pageload event) the values of
    > Request.IsAuthenticated and User.Identity are available.
    >
    > So why would the values of user identity and IsAuthenticated not be
    > avaialble in the global.asax of webApp2?
    >
    >
    > Thanks
    >
    >
    > Brad
    >
    >
    >

    Chris Jackson Guest

  4. #3

    Default Re: Single signon (with FormsAuth) for mutliple web apps

    I found the problem....basicaly a brain lapse on my part after being away
    from hands-on coding for a few months.
    I can access the authentication info just fine but I need to do it in
    Application_AuthenticateRequest. Once I did that then everything works as I
    expected: Identity is avaialble and IsAuthenticated is true is the user is
    logged in.
    Brad


    "Chris Jackson" <chrisj@mvps.org> wrote in message
    news:uHqrDQ3gDHA.2172@TK2MSFTNGP09.phx.gbl...
    > In terms of your code, both of your assemblies (one for each we
    application)
    > are completely separate. One assembly doesn't get to read from the other,
    > even though they are in the same App Domain. The ability to read the
    cookie
    > by both essentially serves as the cross-assembly communication mechanism
    > (visualize it as serving a similar function to named pipes); others are
    > available, but this is probably the easiest.
    >
    > One solution I have implemented is to create a custom logon page that
    looks
    > for a cookie that indicates authentication. If I find a valid cookie, then
    I
    > go ahead and set up that user as authenticated and return to the page that
    > requested the authentication. If I don't, then I display the page as
    normal
    > and have them enter their user/pass.
    >
    > --
    > Chris Jackson
    > Software Engineer
    > Microsoft MVP - Windows XP
    > Windows XP Associate Expert
    > --
    > "Brad" <nospam@co.lane.or.us> wrote in message
    > news:%23SiEhvtgDHA.3828@tk2msftngp13.phx.gbl...
    > > I'm working on single signon for multiple web apps on a single domain.
    If
    > I
    > > authenticate in wepApp1 then I am authenticated in webApp2 however,
    > anywhere
    > > in the global.asax code of webApp2 the following don't seem to be
    > > set/initialized:
    > > Request.IsAuthenticated
    > > User.Identity
    > > The authentication cookie is available in webApp2's global.asax and
    > once
    > > a form is loaded (i.e. I'm on a pageload event) the values of
    > > Request.IsAuthenticated and User.Identity are available.
    > >
    > > So why would the values of user identity and IsAuthenticated not be
    > > avaialble in the global.asax of webApp2?
    > >
    > >
    > > Thanks
    > >
    > >
    > > Brad
    > >
    > >
    > >
    >
    >

    Brad Guest

  5. #4

    Default Re: Single signon (with FormsAuth) for mutliple web apps

    Hi Brad,

    I am glad to know that the problem is resolved.

    Thank you very much for sharing your solution. It is helpful to everybody
    here.

    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

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