473,795 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IsAuthenticated with multiple cookie

Hello,

I currently have two section in my site which required authentication,
to be able to have different section, I've create virtual directory for the
two sections and I've try to use forms authentication with the following
web.config in the root

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>

<location path="sub1">
<system.web>
<customErrors mode="Off"/>
<authenticati on mode="Forms">
<forms name=".General"
loginUrl="/sub1/default.aspx"
timeout="15"
protection="All ">
</forms>
</authentication>

<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>

<location path="sub2">
<system.web>
<authenticati on mode="Forms">
<forms name=".Personne l"
loginUrl="/sub2/default.aspx"
timeout="15"
protection="All ">
</forms>
</authentication>

<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>

If I go to sub1, I get a request to get authenticated, which is working
fine, however if I try to go to sub2 afterward using the
Request.IsAuthe nticated to see if it is, it will return True, base on the
fact that the first forms (sub1) has already put a cookie.

My question is how can I check which cookie has been authenticated, if
possible base on the FORMS name="..."

Thank

ML
Nov 19 '05 #1
0 1157

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

Similar topics

13
12053
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or Konqueror on Linux) the session variables will mix up and only the latest selection or options will...
0
1255
by: John Bravo | last post by:
Hi, I am hosting a .NET Passport Site in Pre-Production environment ( Windows 2003 Server, IIS 6, Passport 2.5). Issue 1) The site is working fine ( I am able to signout and signin) when I use Passport.GetIsAuthenticated method but when I use Passport.IsAuthenticated property is always returns me "false". I have made necessary changes in web.config to implement forms authentication.
0
2119
by: Fred Palmer | last post by:
Hi all, Can anyone point out some best practices for handling cookies with multiple domains aliases? The problem is that I've got a site with multiple domain aliases and I want them to all use the same cookie. This problem can arise with even one domain if you don't set the domain on the cookie correctly. For example: Don't set the domain to ".mydomain.com" (leave out the first ".". If user's come in from "mydomain.com" or if they...
4
5469
by: Nedu N | last post by:
Hi, I am using Forms authentication -in which - I am trying to use User.Identity.Name, i am getting the user name in this field even after i logout (i.e, FormaAuthentication.SighnOut(), and also i am trying to use User.Identity.IsAuthenticated for checking whether the User has logged in or not. I don't want to store the user name in Session variable once the User logs in.
0
1895
by: Kepler | last post by:
I'm testing very basic FormsAuthentication and having trouble with non-persistent cookies. Once authenticated with a non-persistent cookie, if I leave the browser alone for 30 minutes, Request.IsAuthenticated returns false on my next request. WHY? At first I thought it had to do with session timeout, but session timeout is set to 20 minutes, and I'm still authenticated after 20 minutes. Thirty minutes is the magic number. I'm at a loss...
5
4919
by: Shane Thomas | last post by:
Hello, I'm having difficulty handling cookies with paths other than "/". An HttpWebRequest object returns these headers: Date: Tue, 26 Apr 2005 21:29:39 GMT Server: Apache/1.3.33 (Unix) PHP/4.3.10 Set-cookie: phpusid=12345; path=/; expires=Wednesday, 09-Nov-2008 23:12:40 GMT,data=deleted; expires=Mon, 26-Apr-2004 21:29:38 GMT; path=/stats; domain=www.somesite.com,data=deleted; expires=Mon, 26-Apr-2004 21:29:38 GMT;
0
1276
by: dotnettester | last post by:
Hi, I am working on an application and want to set a cookie so that on a page when I check 'Request.IsAuthenticated', it would give me the correct value. How can I set the Authentication cookie? I tried... FormsAuthentication.SetAuthCookie("myUserName", false); after the user has successfully been authenticated, but it doesn't work.
5
10867
by: piedpiper | last post by:
I am coding a http proxy in c# and using httpwebrequest class to send request to the web server, when the server returns multiple set-cookie headers then the httpwebresponse object combines them all in to a single set-cookie key-value pair. I am tryin to get the value of the headers in the following way. for (int i = 0; i < response.Headers.Count; ++i) Console.WriteLine("{0}:{1}", response.Headers.Keys, response.Headers);
1
4961
by: domnicx | last post by:
Hi, I am using the httpweblistener class to build a web server kinda functionality. I have to send multiple set-cookie headers in a single response when queried for a particular request and i havent been able to find a way to do that. I tried the cookie class and httpweblistenerresponse.addcookie() method but it still sends only a single set-cookie header. I would like to send somethin like this: Set-Cookie: AB=; domain=.example.com;...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10448
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10167
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9046
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.