ThinkGeo.com    |     Documentation    |     Premium Support

V10.6 - WMS GetCapabilities HTTP 500 Error

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);
        }

Dennis,
Could you log the detailed error to somewhere? something like

logger.error(ex.ToString());

It may some resource out of usage. But not sure which one. We need know what exact error is.

Thanks

Frank

Frank,

I’ll change the code to log the details of the exception.

Be advised it may very well be months before I can provide any details back to you.

Dennis

Thanks Dennis .

Frank