Tracking down the cause of a web service fault running in IIS

Posted by BG100 on Server Fault See other posts from Server Fault or by BG100
Published on 2011-03-15T15:55:39Z Indexed on 2011/03/15 16:12 UTC
Read the original article Hit count: 332

Filed under:
|
|
|

I have built a web service in Visual Studio 2008, and deployed it on IIS 7 running on Windows Server 2008 R2.

It has been extensively tested, handles all errors gracefully and logs any uncaught errors to a file using log4net.

The system normally runs perfectly, but occasionally (2 or 3 times a day) a fault occurs and screws up the application which needs an iisreset to get it working again.

When the fault occurs I get some random errors that are caught by my catch-all error log, such as:

  • Value cannot be null.
  • Could not convert from type 'System.Boolean' to type 'System.DateTime'.
  • Sequence contains no elements

These errors are raised on every request until I manually do an iisreset, but there is no sight of them when the system is running normally.

The web service is a stateless request-response application. Nothing is stored in the session. It could be load related, but I doubt it as there are only around 30 or 40 requests per minute.

This is proving very tricky to track down. I can't work out what is putting IIS into this bad state, and why it needs an iisreset to get it working again. Nothing is reported in the event log.

Can anyone suggest how to enable more extensive logging that might catch this fault?

Also, does anyone know what might be causing the problem?

© Server Fault or respective owner

Related posts about iis

Related posts about iis7