MapSuite Team,
On rare occasions we encounter an HTTP 500 error. The message from the Exception reads:
The remote server returned an error: (500) Internal Server Error.
The application will have been running just fine for weeks and months and then all of sudden HTTP 500 error.
The basic code is below.
When this condition is encountered the application sets a timer for ninety seconds and when it expires another WebRequest.Create/GetResponseAsync is invoked. This cycle continues until successful. And that’s the issue…it is never successful again until the application is stopped and restarted.
This is not a server issue because the same requests can be sent via Internet Explorer, on the same machine, and the results come back successfully.
Is there anything that you know of that would allow the application to programmatically ‘clear’ this condition? As something must be getting cleared when the application is stopped and then restarted.
Thanks,
Dennis
string HttpUriGetCapabilities;
HttpUriGetCapabilities = "Uri=http://IpAddress:47908/WmsHandler.axd?SERVICE=WMS&REQUEST=GetCapabilities&";
// create WebRequest
try
{
TheWebRequest = System.Net.WebRequest.Create(HttpUriGetCapabilities);
TheWebRequest.Timeout = 8,500;
}
catch (Exception ex)
{
return (error-condition);
}
// initiate Response from WmsServer
try
{
TheWebResponse = await TheWebRequest.GetResponseAsync();
}
catch (Exception ex)
{
return (error-condition);
}