Re: Cookie setting with IP address, not Domain name

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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" <ToddBrewer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:467666DC-4CD4-4D5B-AA68-51BA8F979575@xxxxxxxxxxxxxxxx
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



.



Relevant Pages

  • Re: PHP EMail Form and set cookie
    ... Do you have any example code or give me some pointers. ... cookie and preset the From part of the email from the cookie. ... Just keep in mind you can't control cookie behavior on the browser end. ... it (except for sites I specify). ...
    (comp.lang.php)
  • Re: Attempt to de-mystify AJAX
    ... "Hyperlinks" always open a new browser window. ... key (cookie) is still there and still contains the original value. ... You can get the cookies from the HTTP_COOKIE CGI environment variable. ...
    (comp.databases.pick)
  • Re: NSA Used Cookies to Track Visitors Web Activities?
    ... Could unwittingly installing a compromised browser open the doors wide to cookie-based intrusions? ... A cookie itself is unlikely to be a virus, but if the browser code is written in C, it is very likely to have arrays that are susceptible to "buffer overrun" Sometimes a clever enough person can use such a bug to cause executable code stored in an allegedly non-executable file to replace code in your browser or operating system. ... an external intruder coming in over an Internet connection, presumably that intruder would have access to the cookies on one's machine. ...
    (comp.sys.mac.system)
  • Re: Cookies from ASP.NET app not persisting even when enabled!
    ... > I'm new to ASP.NET and have been developing a small app at work to test ... > and the authorization cookie is saved as expected on the local machine. ... any browser OTHER THAN the one on the development ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Great SWT Program
    ... Every browser I've ever ... server when requesting any URLs from that server. ... doesn't send the cookie. ... every so often nail the ones that got by adblock, ...
    (comp.lang.java.programmer)