Re: Session Cookie not accessible across Sub-Domains

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi John,
Thank you for the reply. I'm not sure I understand; or perhaps vice-versa?

I don't set the ASP.NET Session cookie. ASP.NET does that all on it's own. I
do know how to write cookies and set domains, etc. My question is, how do I
get ASP.NET to set the correct domain wherever it set its own cookie?

Thanks,
Doug


"John Timney (ASP.NET MVP)" wrote:

> When initially setting the cookie
>
> Response.Cookies("domain").Value = DateTime.Now.ToString
> Response.Cookies("domain").Expires = DateTime.Now.AddDays(1)
> Response.Cookies("domain").Domain = "mydomain.com"
>
> .................should do the trick.
>
> I think its case sensitive at the browser.
>
> --
> Regards
>
> John Timney
> ASP.NET MVP
> Microsoft Regional Director
>

.



Relevant Pages

  • Stupid setcookie() question...
    ... I can happily set them up so that hidden fields get created with the values ... ITS PRINTING OUT THE VALUE OF THE COOKIE PRIOR TO THE FORM BEING SUBMITTED. ... value so it is now "John" then John still gets printed out. ...
    (alt.php)
  • Re: HttpWebRequest.GetResponse does not work on some uris
    ... > after returning the cookie? ... a network monitor like ProxyTrace from http://pocketsoap.com. ... I'd look at the interaction between IE and the remote site, ... John Saunders ...
    (microsoft.public.dotnet.framework)
  • Re: Hatred of Paul?
    ... >believe there is one song where John says "Cookie" or something like ... >that which, I believe, may be a vague imitation of cookie Monster. ... Extended, alternate, and out- takes of POB tracks that appear on ... bootlegs reveal John enjoying himself and the session. ...
    (rec.music.beatles)
  • Re: Session Cookie not accessible across Sub-Domains
    ... You can't share sessions across domains, nor applications natively - so it ... will always set a new cookie as you move between domains. ... >> John Timney ... >> ASP.NET MVP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I Change Computer Name
    ... >>I have purchased a used computer with Windows XP home and ... >>visit a website and get a cookie it has a name in front ...
    (microsoft.public.windows.mediacenter)