473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Two websites, same FormsAuthenticationTicket?

We have two different websites, both written in ASP.NET 2.0/C#, running
in different virtual directories on the same server.

They both use forms authentication.

Their FormsAuthenticationTicket cookies seem to overwrite each other.

--
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Feb 26 '08 #1
2 1507
In the respective application root's web.config add a unique setting for the
authentication name property:
<authentication mode="Forms">
<forms
name="MyApplication.ASPXAUTH"
path="/"
loginUrl="~/Login.aspx"
... etc.

"Jeff Dege" <jd***@jdege.visi.comwrote in message
news:13*************@corp.supernews.com...
We have two different websites, both written in ASP.NET 2.0/C#, running
in different virtual directories on the same server.

They both use forms authentication.

Their FormsAuthenticationTicket cookies seem to overwrite each other.
Feb 26 '08 #2
Jeff,

Configure the authentication section in your web.config file to use a unique
name for the authentication cookie. The virtual directory name/alias is a
good choice.

<forms name="VirtualDirectoryAlias" ... />

--
Paulus E Kurniawan
http://www.paulusevan.net
"Jeff Dege" wrote:
We have two different websites, both written in ASP.NET 2.0/C#, running
in different virtual directories on the same server.

They both use forms authentication.

Their FormsAuthenticationTicket cookies seem to overwrite each other.

--
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Feb 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: MrMike | last post by:
I've successfully implemented forms authentication in my ASP.NET/VB.NET project. I use the FormsAuthenticationTicket to create a cookie on the user's browser when they log on. My question is:...
1
by: Grey | last post by:
I read from some site to learn the form authentication with AD that it needs to create a FormsAuthenticationTicket to store the group list. I want to that what is the function of...
5
by: Kiran B. | last post by:
New to .net... I am wondering if I have a user name as userone and this userone has sepcial sales id 201, how can i associate both userone and 201 in a cookie and access it later on. I can access...
2
by: karunakar | last post by:
Hi All I dont want to expire the applicatoion Once login the application i dont want to expire the application Presently iam doing using cookies this is not working fine Please help me out ...
1
by: Dean R. Henderson | last post by:
I setup FormsAuthentication on a couple websites where it has been working as expected for a long time. I used this code to setup the same type of authentication on a new website I am working on...
1
by: ad | last post by:
The codes below is copy from msdn about FormsAuthenticationTicket. It add FormsAuthenticationTicket to cookie. How can I add the FormsAuthenticationTicket to URL not to Cookie? ...
0
by: Andrea | last post by:
If I did something like that: FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(ID, false, 20); then add the ticket encrypting it to the cookie collection, shouldn't the cookie...
1
by: JTourvieille | last post by:
Hi, Does any one knows how to list all FormsAuthenticationTicket available on a server? Thanks
4
by: dev648237923 | last post by:
Upon logon I create a ticket and put some userdata in it: FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( 3, //Version tUsername.Text, //Username DateTime.Now, ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.