seesion cookie question.

A

ashish

We are having a web application which spans across multiple domains.
Iam trying to synchronize session information between the two domains.
If I know the value of ASP.NET_SessionId cookie, can I use a
HttpWebRequest class to send a request to the other domain with the
ASP.NET_SessionId cookie in it, and make ASP.Net think that this is the
same session Request ? ( i would be passing other credentials to secure it )

This is what i tried ( this is not working though !)

Dim myRequest As HttpWebRequest =
HttpWebRequest.Create("http://localhost/MyOtherSite/synchronize.aspx")


Dim mySessionCookie As New Cookie("ASP.NET_SessionId",
"fbo0sd55risyn245gfgunt45", "/")

mySessionCookie.Domain = "http://localhost/MyOtherSite/"

myRequest.CookieContainer = New CookieContainer

myRequest.CookieContainer.Add(mySessionCookie)

Dim myResponse As HttpWebResponse = myRequest.GetResponse

Dim myStream As IO.Stream = myResponse.GetResponseStream

Catch ex As Net.WebException
MessageBox.Show(ex.ToString)
End Try


any help or pointers would be appreciated

thanks
-ashish
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top