By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 910 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

Cookie setting with IP address, not Domain name

P: n/a
I have an ASP.NET 2.0 site that stores a cookie on the browser. Instead of
the domain name (www.somename.com) it comes accross as the IP address of the
server. This works in Firefox, but fails with IE 6 because of security. I
went through and forced the Domain like this:

this.Response.Cookies["culture"].Value = "en-MX";
this.Response.Cookies["culture"].Expires = DateTime.Now.AddDays(30);
this.Response.Cookies["culture"].Domain = "somename.com";

This results in Firefox denying the cookie, as well as IE. Why is the
cookie coming across as an IP address? Is there a way around this?

Thanks in advance.

Todd

Oct 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
the domain you specify for the cookie must belong to request domain. if the
browser is seeing an ipaddress, then you can not specify a domain. the
browser seeing the ipaddress is usualy caused by a redirect, or proxy
infront of the server.

-- bruce (sqlwork.com)
"Todd Brewer" <To********@discussions.microsoft.comwrote in message
news:46**********************************@microsof t.com...
>I have an ASP.NET 2.0 site that stores a cookie on the browser. Instead of
the domain name (www.somename.com) it comes accross as the IP address of
the
server. This works in Firefox, but fails with IE 6 because of security.
I
went through and forced the Domain like this:

this.Response.Cookies["culture"].Value = "en-MX";
this.Response.Cookies["culture"].Expires =
DateTime.Now.AddDays(30);
this.Response.Cookies["culture"].Domain = "somename.com";

This results in Firefox denying the cookie, as well as IE. Why is the
cookie coming across as an IP address? Is there a way around this?

Thanks in advance.

Todd

Oct 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.