Sessions and Cookies dont work

  • Thread starter Thread starter DougS
  • Start date Start date
D

DougS

I have a simple ASP.Net application, framework 1.1, sp1, VS2003. I cant set
a session variable or a cookie. How can I tell if there is something wrong
with my environment?

Dim cookie As HttpCookie = New HttpCookie("UserID", txtName.Text)

cookie.Expires = DateTime.Now.AddDays(3)

Response.Cookies.Add(cookie) 'there is not a txt file in my cookies folder

Session code:

Session.Add("RepID", txtName.Text)

When I reference this session in another subroutine on the same page the
session is NOTHING
 
I ran aspnet_regiis /ua to remove asp.net and then ran aspnet_regiis /i to
reinstall it. That fixed the problem. It would be nice to know why it flakes
out like that. I've lost hours of dev time because asp and iis are so flaky.

DougS
 
Back
Top