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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top