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
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