473,395 Members | 1,412 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,395 software developers and data experts.

Disappearing cookies after login.aspx

I am implementing a secure website using the ASP.NET FormsAuthentication
model. I have taken the simplest code examples from MSDN
(login.aspx,default.aspx, web.config) but cannot get proper behavior on my
machine.

As an unauthenticated user, I navigate to the website http://localhost/XXX.
global.Authenticate_Request considers sending default.apsx but cannot find
any authentication cookie in the Context object, so the request is
redirected to login.aspx. Just as advertised.

Now, I perform a login through login.aspx. When RedirectFromLoginPage is
called by login.aspx, global.Authenticate_Request is again invoked. But no
authentication cookie is present in the Context object, so the request is
once again redirected to login.aspx.

I modified the login.aspx login_click behavior to explicitly create a Ticket
and Cookie (unencrypted), place it in the Context.Response collection. I
verify the presence of the new cookie with the debugger before login_click
terminates. Next, I watch the global application's Authenticate_Request
with the debugger and see that the Context.Response.Cookies collection is
empty!

Here is my development environment:
1) W2K Pro SP5
2) IIS 5.0
3) Visual Studio .NET 2003, .Net Framework 1.1
4) Zone Alarm Pro 3.0
5) Norton Antivirus

LAN is wireless. Access point is also a router. Router is configured to use
Zone Alarm security settings from localhost.

I have tried out this application in the following ways, all exhibiting the
same behavior:
1) IE 6 Browser session on localhost.
2) Mozilla browser session on localhost
3) IE 6 browser session on another machine on the intranet

I tried shutting down ZAPro, disabling autostart and rebooting, to no avail.
I checked the privacy settings and have the following set:
Allow session and persistent cookies
Block 3rd party cookies.

I toyed around with IIS but don't really know what I'm doing so gave up and
recreated the website. No change in behavior (ARRGH!).

If I modify login.aspx to make the user authentication a persistent cookie,
the same behavior occurs initially, but a subsequent browser session will
bring up default.aspx.

WHAT IS HAPPENING TO MY COOKIES? I am losing my cookies over these lost
cookies!

Another fact:
When I installed VS.NET on localhost, IIS 5 wasn't installed. I later
installed IIS, and ran a .NET tool to map .NET into IIS. I also ran the
VS.NAT install to atttempt to repair anything that got screwed up because
IIS wasn't there on the initial install.

Nothing I have done has resolved the problem. I figure that this problem is
due to the configuration of localhost.

CAN ANYONE HELP ME???????

You help is much-appreciated. Thanks in advance.

Jeff Bartels
je*********@usa.net
Nov 18 '05 #1
0 2188

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

Similar topics

2
by: Beginner | last post by:
I know this is an old question, but searching all over the internet plus several MS security conferences, still haven't got a straight anwser. Basically, the login.aspx is on one dedicated server...
2
by: Murphy | last post by:
Our website contains subdirectories for each subsidiary company, each company has it's own look and feel to the pages in their subdirectory although they are all part of the main website. The...
2
by: | last post by:
While I was learning about baking cookies in ASP.NET, I also ran across this interesting article that outlined a few bombs to watch out for when using cookies in ASP.NET: ...
1
by: frekster | last post by:
All, Windows xp pro box with vs 2003 and .net 1.1 installed. Downloaded a project from source safe via vpn to my ome pc to work from home. I have three other projects on my pc that works fine...
1
by: frolda | last post by:
Hi, I moved my login.aspx page from root to a subdirectory and made -hopefully- all necessary changes for all Login controls. All the controls work just fine, except one. To my regret, the...
6
by: BizWorld | last post by:
Hi, I have a scenario where i need to configure only Login.aspx page to use SSL. All other application will run on HTTP protocol. If someone can guide me how to accomplish this. One of my idea...
0
by: PolarBears | last post by:
We have several ASPX 1.1 web applications that reference a Login.aspx page. Now groups and roles have been added to .NET 2.0. And we now have the new Visual Studio 2005. I am guessing that with...
3
by: Big Charles | last post by:
Hi, How to redirect any page to Login.aspx? I tried writting this in web.config <authentication mode="Forms"> <forms name="aucoockie" loginUrl="wf_login.aspx" protection="All" path="/" />...
2
by: vikramp | last post by:
Hi, I am trying to learn new membership/roles features of ASP.NET 2.0. When we setup forms authentication and specify deny users="?" under authorization, the application asks for login. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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...

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.