D
Daatmor
Hi,
I've worte a program that will grab the html file content from web server.
It's work
------------------------------------------------------------------------------------------------------------------------------
string strURL = "http://127.0.0.1/webapp/requestview.aspx?id=1185";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL);
HttpWebResponse response = null;
NetworkCredential credentials = new NetworkCredential("abc", "password",
"svr001");
request.Credentials = credentials;
response = (HttpWebResponse)request.GetResponse();
------------------------------------------------------------------------------------------------------------------------------
But when I change Cookieless to "true" in web.config file, the URL will
redirect to other URL with session id
http://127.0.0.1/webapp/(fadfasdfaderew908rfdfas)/requestview.aspx?id=1185
And I will receive "401 Unauthorized" from WebException when I call
request.GetResponse().
How can I solve this problem? and grab the file content
Thanks
Daatmor
I've worte a program that will grab the html file content from web server.
It's work
------------------------------------------------------------------------------------------------------------------------------
string strURL = "http://127.0.0.1/webapp/requestview.aspx?id=1185";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL);
HttpWebResponse response = null;
NetworkCredential credentials = new NetworkCredential("abc", "password",
"svr001");
request.Credentials = credentials;
response = (HttpWebResponse)request.GetResponse();
------------------------------------------------------------------------------------------------------------------------------
But when I change Cookieless to "true" in web.config file, the URL will
redirect to other URL with session id
http://127.0.0.1/webapp/(fadfasdfaderew908rfdfas)/requestview.aspx?id=1185
And I will receive "401 Unauthorized" from WebException when I call
request.GetResponse().
How can I solve this problem? and grab the file content
Thanks
Daatmor