Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9306989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:17:41+00:00 2026-06-19T00:17:41+00:00

I am using FormsAuthentication.SetAuthCookie() .It works fine but when I use same method in

  • 0

I am using FormsAuthentication.SetAuthCookie().It works fine but when I use same method in another project with different database and execute both projects at same time I get following problem:

1.When I log on the first project it auto logs On with same username in the second one although other database does not contains the username.

Is there any way to solve this Or should I use another method such as FormsAuthenticationTicket or Sessions.Thanks In advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:17:42+00:00Added an answer on June 19, 2026 at 12:17 am

    I found that the problem was with same cookie name.When two web applications are deployed in the same domain then when anyone is logged in then the second one will be automatically logged in both application because they use the same Authentication’s cookie name.
    So finally I ended changing the cookie name in web.config

    <authentication mode="Forms">
      <forms name="MynewCookie" loginUrl="~/Account/LogOn" timeout="1" protection="All" slidingExpiration="true" requireSSL="false"/>
    </authentication>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using FormsAuthentication.SetAuthCookie(username, true ); so that a helpdesk person could impersonate another
I am using FormsAuthentication.SetAuthCookie Method in my application.after Client login i am setting FormsAuthentication.SetAuthCookie(txtUserNo.Text.Trim(),
I have problem with Uploadify: I log in the project using: FormsAuthentication.SetAuthCookie(myName, false); Then,
hi we are using FormsAuthentication.SetAuthCookie(profile.Id, false); Now the question is when does this cookie
I see the guidance when using formsAuthentication in ASP.NET is to use SSL via
My asp.net application is not using formsauthentication. Instead we make a call to database,
Using this code for authentification: HttpContext.Current.User=new GenericPrincipal (new GenericIdentity(user.UserName), roles); FormsAuthentication.SetAuthCookie(user.UserName,false); Problem is -
I have authenticated users to log on my system using this code: FormsAuthentication.SetAuthCookie(user, false);
I'm using FormsAuthentication in my C#.net application and am appending to a database table
In LogIn method I have: FormsAuthentication.SetAuthCookie(model.User, false); and to get name of this user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.