Howdy,
I have one IIS Application, with asp/asp.net pages. I set a cookie like so in an ASP page.
Response.Cookies("AuthCookie")("hash") = md5(username & Application("HashCode")) Response.Cookies("AuthCookie")("username") = username
Then I response.redirect to my asp.net page, which is protected by Forms Authentication, so Application_AuthenticateRequest Fires..and I try to access this cookie like so..
Dim authCookie As HttpCookie = Context.Request.Cookies("AuthCookie")
....Sometimes the cookie is there ...Sometimes it isn't there
Very Confusing.
The site always stays in one browser window, I've tried messing with cookie security, without success. I've also noticed that along with this cookie, lots of other cookies dissapear, like the session cookies asp/asp.net sets.
Any ideas, this one has me baffled..?
--Michael 2 3470
"Raterus" <ra*****@spam.org> wrote in message news:u5**************@TK2MSFTNGP09.phx.gbl...
Howdy,
I have one IIS Application, with asp/asp.net pages. I set a cookie like so in an ASP page.
Response.Cookies("AuthCookie")("hash") = md5(username & Application("HashCode")) Response.Cookies("AuthCookie")("username") = username
Then I response.redirect to my asp.net page, which is protected by Forms Authentication, so Application_AuthenticateRequest Fires..and I try to access this cookie like so..
Dim authCookie As HttpCookie = Context.Request.Cookies("AuthCookie")
...Sometimes the cookie is there ...Sometimes it isn't there
Very Confusing.
The site always stays in one browser window, I've tried messing with cookie security, without success. I've also noticed that along with this cookie, lots of other cookies dissapear, like the session cookies asp/asp.net sets.
Any ideas, this one has me baffled..?
Michael, cookies don't just disappear. What happens is that the browser sends them or not, as it sees fit.
One of the most-frequent causes of "cookie loss" involves issues with the domain of the cookie versus the domain of the site. Is it possible that sometimes you are using localhost and other times mymachine.com? If you created the cookie with "mymachine.com" as its domain, it would not appear on pages from localhost.
--
John Saunders
johnwsaundersiii at hotmail
I "think" I have this fixed, it had to do with the path of the variable not being set properly. I set the path in asp to this.
Response.Cookies("AuthCookie").path = "/"
"John Saunders" <jo**************@notcoldmail.com> wrote in message news:u4**************@tk2msftngp13.phx.gbl...
"Raterus" <ra*****@spam.org> wrote in message news:u5**************@TK2MSFTNGP09.phx.gbl...
Howdy,
I have one IIS Application, with asp/asp.net pages. I set a cookie like so in an ASP page.
Response.Cookies("AuthCookie")("hash") = md5(username & Application("HashCode")) Response.Cookies("AuthCookie")("username") = username
Then I response.redirect to my asp.net page, which is protected by Forms Authentication, so Application_AuthenticateRequest Fires..and I try to access this cookie like so..
Dim authCookie As HttpCookie = Context.Request.Cookies("AuthCookie")
...Sometimes the cookie is there ...Sometimes it isn't there
Very Confusing.
The site always stays in one browser window, I've tried messing with cookie security, without success. I've also noticed that along with this cookie, lots of other cookies dissapear, like the session cookies asp/asp.net sets.
Any ideas, this one has me baffled..?
Michael, cookies don't just disappear. What happens is that the browser sends them or not, as it sees fit.
One of the most-frequent causes of "cookie loss" involves issues with the domain of the cookie versus the domain of the site. Is it possible that sometimes you are using localhost and other times mymachine.com? If you created the cookie with "mymachine.com" as its domain, it would not appear on pages from localhost.
--
John Saunders
johnwsaundersiii at hotmail This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Keon |
last post by:
Hoi
Is it possible to use cookies between different domains?
For my site I use 2 domains;
the first for my global site with ASP en HTML
the second is for my forum located on "hyperboards" a...
|
by: richard |
last post by:
My website uses cookies to persist a certain amount of data on the
client. However, occasionally the cookies will disappear or be set to
an empty string for no discernable reason. It does not...
|
by: Miguelito Bain |
last post by:
Hi Everyone-
I have a problem with my menu bars disappearing. Here's a little
backround...
I have one main database that has a page called "Prior Records." There
are several command buttons...
|
by: dave |
last post by:
I have 2 pages... in the first page i check to see for
the existance of the cookie, if found do something else
set the value and set the cookie.
(cookie gets set ok)
I use the following code to...
|
by: Mach Runner |
last post by:
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...
|
by: Prasanna Padmanabhan |
last post by:
I am writing a simple HTTP Client in .NET. I make an HTTP Request and
examine the response.
I get an empty CookieCollection when I do HttpWebResponse.Cookies. However
HttpWebResponse.Headers...
|
by: m |
last post by:
I have a strange and frustrating problem. page1.aspx asks for a login
and goes to itself to validate the login. if it succeeds it creates a
cookie for the login and goes to my creditcard form,...
|
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:
...
|
by: insomniac |
last post by:
Hello,
I'm not a newbie to cookies, however I am stumpped by a receent issue
that has come up. I am running my web application through a frame
that belongs to another company. This application...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
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...
|
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
|
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...
|
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...
| |