Here Is My Code Where I’m Making Request A URL Using HttpWebRequest And Getting Response From HttpWebResponse. But httpwebresponse object throws an exception that is Internal Server Error!
url="http://www.google.com/"
Uri urlCheck = new Uri(url);
request = (HttpWebRequest)WebRequest.Create(url);
request.Timeout = 5000000;
response = (HttpWebResponse)request.GetResponse(); //Here Getting The Exception..
receiveStream = response.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
strmRead = new StreamReader(receiveStream, encode);
result = strmRead.ReadToEnd();
It looks like the site is crashing if the client doesn’t support cookies. So you could enable support for cookies on the client by setting a CookieContainer: