Hi Dmitriy,
As MSDN states, the cookies can be retrieved across the domains, please
refer to :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csvr2002/ht
m/cs_sp_security_uvmp.asp
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Dmitriy Lapshin [C# / .NET MVP]" <
[email protected]>
| References: <
[email protected]>
| Subject: Re: Passing Cookies
| Date: Fri, 3 Oct 2003 17:54:10 +0300
| Lines: 42
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| X-Original-NNTP-Posting-Host: engine.validio.com.ua
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: nexus.validio.com.ua 193.41.50.2
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl!nexus.validio
.com.ua!engine.validio.com.ua
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188768
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Tom,
|
| If the websites A and B are within the same domain, you can retrieve
cookies
| from the Cookies property of the HttpRequest instance available from the
| Page's Request property.
|
| --
| Dmitriy Lapshin [C# / .NET MVP]
| X-Unity Test Studio
|
http://x-unity.miik.com.ua/teststudio.aspx
| Bring the power of unit testing to VS .NET IDE
|
| | > I know how to create a cookie using the HttpCookie.
| > I know about setting its domain so it can be shared.
| >
| >
| > So I have created a cookie on web site A and set it to
| > expire in 10 minutes.
| >
| > Now I am on web site B, in VS.NET C# and I want to access
| > the cookie created on web site A.
| >
| > Is this possible?
| >
| > Can anyone advise??
| >
| > Here is the code:
| >
| > DateTime dt = DateTime.Now;
| > TimeSpan ts = new TimeSpan(0,0,10,0);
| >
| > HttpCookie MyUIDCookie = new HttpCookie("MyCookie", "some
| > value");
| > MyUIDCookie.Domain = ".mydomain.com";
| > Response.Cookies.Add(MyUIDCookie);
| >
| > MyUIDCookie.Expires = dt.Add(ts);
| >
| >
|
|