Generate service log for WCF service from web.config

Sometime our service not returning correct error. So, find exact problem of our code we can use diagnostics to generate service log. With help of service log we can see what is the problem in service.

To generate service log add code to web.config as follows.


    
      
    


    
    
      
    
    
      
        
          
        
      
      
        
          
        
      
    
  

with above change you can generate service log. Write your_path where you want to generate log file (e.g. c:\servicetrace.svclog).
To open service log find SvcTraceViewer.exe in Program Files\Microsoft SDKs\Windows\v7.0A\Bin (as per your windows version).

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>