I have a web service that has been running for years. Today, someone told me it was giving server error 500. I checked the server logs for the past several months and it seems that I'm getting a status of 200 for 99% of the calls to the service and then a few 500's every now and again to spice things up. The server log itself is a bit hefty to read, so I tried to reduce it a little without changing anything important.
Here is an extract from the server log:
2013-09-16 09:58:19 <Server IP> GET /WebServicePath/WebService.asmx - 80 - <Server IP> <User Agent String> 200 0 0 874
2013-09-16 09:58:22 <Server IP> GET /WebServicePath/WebService.asmx op=MyFunction 80 - <Server IP> <User Agent String> 200 0 0 203
2013-09-16 09:58:35 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 500 0 0 437
2013-09-16 09:58:42 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 500 0 0 0
2013-09-16 09:58:53 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 200 0 0 499
2013-09-16 09:59:05 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 200 0 0 203
2013-09-16 09:59:11 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 200 0 0 187
2013-09-16 09:59:16 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 200 0 0 296
2013-09-16 10:03:17 <Server IP> POST /WebServicePath/WebService.asmx/MyFunction - 80 - <Server IP> <User Agent String> 500 0 0 15
The HTTP status is the fourth number from the right.
The server is IIS7 and the user agent string used is this:
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/5.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729)
I checked Event Viewer for anything logged at the times when I got the 500s, but found nothing.
I found many examples of people getting server error 500 on newly-deployed services and they normally have an assembly issue. But why on earth would it just randomly give 500 and be fine otherwise?