Вопрос

У меня есть приложение, которое загружает множество страниц ASP.NET, и в каждом цикле мне нужно взять некоторую информацию из смирения загруженной страницы.

Как я могу это сделать?

пример:

WebRequest request = HttpWebRequest.Create(url);

WebResponse response = request.GetResponse();
//How to get the Session from response???
Это было полезно?

Решение

You can't. Session state object is on the server.

Другие советы

If this were even remotely possible it would be a security nightmare. Session data is protected in the server's memory and is only accessible to objects running within the application pool of the site. If you need information from a remote page in this manner, the remote page will have to be restructured to provide the information either through added headers or cookies.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top