Bravo2007

Hi,

I am getting this error when trying to load the .svclog file in traceviewer tool.

the message says "Unexpected end of file has occured. The following elements are not closed System,E2ETraceEvent. Line 1 position"

Any idea why am i getting this error I have configured service with default logging parameters.

Thanks



Re: Windows Communication Foundation (Indigo) error in svcTraceViewer tool

Carlos Figueira - MSFT

Did the application that was running the server terminate normally, or was it aborted (i.e., kill process or CTRL+C for console apps) That's usually an indication that the trace in the trace file wasn't terminated properly.



Re: Windows Communication Foundation (Indigo) error in svcTraceViewer tool

Hiten

No, it is a service hosted in IIS. At every requests, the file does appears to be growing





Re: Windows Communication Foundation (Indigo) error in svcTraceViewer tool

Carlos Figueira - MSFT

It's possible that the trace writer is buffering some information and not flushing everything to disk immediately. Can you try adding the following element under the <system.diagnostics> section:

<trace autoflush="true" />

Also, when you get that error, can you still see the traces in the file prior to the last one that is missing the end E2eTraceEvent





Re: Windows Communication Foundation (Indigo) error in svcTraceViewer tool

Hiten

Setting Trace tag fixed it. I am not sure why it was holding it the traces though.. it should have flushed at the end of the request though.

Thanks for the help!





Re: Windows Communication Foundation (Indigo) error in svcTraceViewer tool

Carlos Figueira - MSFT

It's a performance improvement - forcing every trace request to be flushed causes a perf hit that in some cases is not negligible. WCF relies on the underlying code (System.IO) to determine when flushing is necessary.