Cookie is not created why ?

R

raagz

Hi,

I am trying to create a cookie from the value that is passed through
the querystring.here is the piece of code.

cookiename and cookiedata are passed through URL.

HttpCookie TISCookie = new HttpCookie(cookieName,cookieData);
TISCookie.Expires = DateTime.MaxValue;
Response.Cookies.Add(TISCookie);

but this works fine with localhost i.e URL is
http://localhost/webform1.aspx

whereas with machine name it does not i.e
http://p41234/webform1.aspx

The cookie is not at all created.

Thanks
Raagz
 
M

Marina

The browser might have different rules set up for when it accepts cookise.
It might accept them from the intranet zone, but not from the internet zone.
 
Q

qqq

IE will always accept cookies from localhost. See Tools/Internet
Options/Privacy/Advanced. Note that the message says "choose how cookies are
handled IN THE INTERNET ZONE".

Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top