Problem with Forms Authentication when using maultiple application with same user

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

  1. satish_kr98


    Jan 13, 2011
    Likes Received:
    Hello All,

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

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

    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. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.