Problem with Forms Authentication when using maultiple application with same user

Discussion in 'Software' started by satish_kr98, Jan 13, 2011.

  1. satish_kr98

    satish_kr98

    Joined:
    Jan 13, 2011
    Messages:
    1
    Hello All,

    I have 2 Web applications in the same IIS with the virtual directory structure below:

    mydomain.com/site1
    mydomain.com/site2

    both site1 an site2 are using form authentication and creating the token further adding in cookie as below,

    FormsAuthentication.Initialize();
    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,username,DateTime.Now, DateTime.Now.AddMinutes(20),rememberMeSet,globalID ,FormsAuthentication.FormsCookiePath);

    // Encrypt the ticket.
    String hash = FormsAuthentication.Encrypt(ticket);
    //Create the authentication cookie
    HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hash);

    My problem is when I'm logging in to Both site1 and site2 then these two are not running simultaneously on single browser using different tab for same user name.

    one is being logged out when logging to the other application and vice verse.

    Has anyone run in to such problem..
    What wrong thing I'm doing here..Pls help.

    Thanks in advance!!!
     
    satish_kr98, Jan 13, 2011
    #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. boz
    Replies:
    0
    Views:
    2,004
  2. zillah
    Replies:
    0
    Views:
    732
    zillah
    Nov 9, 2006
  3. AxleWack

    Server Error in '/Forms' Application.

    AxleWack, Oct 11, 2007, in forum: General Computer Support
    Replies:
    0
    Views:
    1,040
    AxleWack
    Oct 11, 2007
  4. Russell
    Replies:
    1
    Views:
    876
    Russell
    Oct 15, 2007
  5. arulmanoj78
    Replies:
    0
    Views:
    1,174
    arulmanoj78
    Jan 16, 2009
Loading...

Share This Page