when getting error "The remote server returned an error: (500) Internal Server Error".
we get exact error in WebException
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException wex)
{
string WebError = new StreamReader(wex.Response.GetResponseStream()).ReadToEnd().ToString();
return WebError;
}
we get exact error in WebException
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException wex)
{
string WebError = new StreamReader(wex.Response.GetResponseStream()).ReadToEnd().ToString();
return WebError;
}
0 comments:
Post a Comment