Hi,
does anybody know if it is possible to pass the SessionID with a web
request by using a cookie so that the invoked page in the same domain
can access the session objects of the current user?
HttpWebRequest request = (HttpWebRequest )WebRequest.Cre ate(url);
request.CookieC ontainer = new CookieContainer ();
HttpCookie sessionCookie =
HttpContext.Cur rent.Request.Co okies["ASP.NET_Sessio nId"];
request.CookieC ontainer.Add(ne w Cookie(sessCook ie.Name,
sessCookie.Valu e, "/", "localhost" ));
HttpWebResponse response = (HttpWebRespons e)request.GetRe sponse();
This example doesn't seem to work for me but I do not know why... at
least I get a timeout when I execute the code above although the
mechanism works for every other cookie type, too. If I start a
HttpWebRequest without any session information, the target page has a
new and different sessionID than the soure page.
Thanks for the help
Andre