G
Guest
Hi All,
I'm trying to make a web request to my site from some other ASP.Net
Application. Code used for that is:
string sURL = "<my site url>";
HttpWebRequest wrGETURL = (HttpWebRequest) WebRequest.Create(new Uri(sURL));
wrGETURL.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
..NET CLR 1.1.4322)";
wrGETURL.AllowAutoRedirect = true;
wrGETURL.CookieContainer = new CookieContainer();
wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhResults",
"bhtz=0"));
wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhPrevResults",
"bhtz=0"));
HttpWebResponse webresponse = (HttpWebResponse)wrGETURL.GetResponse();
I get an error when GetResponse() is executed. The error is :
"The remote server returned an error: (500) Internal Server Error."
Any ideas why i'm getting this error?
Thnx in advance.
Pooja.
I'm trying to make a web request to my site from some other ASP.Net
Application. Code used for that is:
string sURL = "<my site url>";
HttpWebRequest wrGETURL = (HttpWebRequest) WebRequest.Create(new Uri(sURL));
wrGETURL.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
..NET CLR 1.1.4322)";
wrGETURL.AllowAutoRedirect = true;
wrGETURL.CookieContainer = new CookieContainer();
wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhResults",
"bhtz=0"));
wrGETURL.CookieContainer.Add(new Uri(sURL), new Cookie("bhPrevResults",
"bhtz=0"));
HttpWebResponse webresponse = (HttpWebResponse)wrGETURL.GetResponse();
I get an error when GetResponse() is executed. The error is :
"The remote server returned an error: (500) Internal Server Error."
Any ideas why i'm getting this error?
Thnx in advance.
Pooja.