Debug EF4 SaveChanges in WCF service hosted by IIS

前端 未结 1 1458
攒了一身酷
攒了一身酷 2021-01-28 18:34

In the existing code the size of transactionEntities is growing and in the almost final statement we\'ve got

transactionEntities.SaveChanges(System.Data.Objects.S

1条回答
  •  终归单人心
    2021-01-28 18:58

    For question #1 - you can turn on diagnostics on your WCF service

    In your web (or app) config:

    1) Add System.Diagnostics section anywhere under configuration element. You can replace path with which ever path you want the files to be stored at.

    
        
          
            
              
                
              
              
                
              
            
          
          
            
              
                
              
              
                
              
            
          
        
        
          
            
          
          
            
          
        
      
    

    2) Under system.ServiceModel add following:

    
          
    
    

    3) Under C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ start SvcTraceViewer.exe. Load both message trace (services_messages.svclog) and service trace log (services_tracelog.svclog). You can either drag drop files in the tool or open one then add another

    4) Look for red bold letters for a problem.

    If you want to make your experience editing the WCF configuration more palatable you can use SvcConfigEditor.exe which is found under same folder as SvcTraceViewer.exe (#3). Just open the config file and you should see Diagnostics folder which will allow you to start/stop and configure diagnostics.

    0 讨论(0)
提交回复
热议问题