Freigeben über


Tracing and Message Logging in WebMatrix (IISExpress) Beta3

 

If you set up a WCF service in WebMatrix or in Visual Studio with IISExpress as the Local IIS Web Server, you might notice some odd behavior with trace logs being truncated.  Recall that with IIS, if you set up message logging or tracing, the log file takes a while to fill with the traces from when you ping the service.  Of course, recycling the app pool or calling IISReset will dump all information in the process to the log and release the lock on the file.  But since IISExpress runs in a single process, killing the process will ungracefully release the lock on the tracing log file.  So, whatever information was being written to the file can easily get truncated.  This is a known issue with Beta3. 

 

I've had some luck getting "better" formed logs, as opposed to well-formed logs, if I stopped making requests to the service for several minutes before closing WebMatrix and opening the log.  Or I would just open the svclog in notepad, fix the malformed data, and then open it in SvcTraceViewer.

 

References for setting up tracing and message logging: