Visual Studio 2008에서 서비스참조 오류발생시 해결방안

The error message:

The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing – long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas

I ran into this problem when my WCF service reached a large size.  

I could no longer right click on the service in Visual Studio and select Update service reference.  

I also could not run svcutil.exe without an error when my WCF service was large.

When I commented out some of the functions to get the size smaller, everything would work, but when I added even one function after that point, it would fail.  

No matter what the function was.

I found out which files needed to be changed by using process monitor while doing various operations.

To fix these problems I had to do 5 things:

1) Replace the svcutil.exe.config file with:

My file was located here: SvcUtil.exe.config

[code lang=’xml’]

   
       
           
           
       
       
           
                
                    
                    
               
           
           
                
                    
                    
                       
                    
                
            
       
   

[/code]

2) Add the client endpoints and the <bindings> element to your machine.config.

My file was located here: C:WindowsMicrosoft.NETFrameworkv2.0.50727CONFIGmachine.config

3) Add the whole <System.ServiceModel> inside your devenv.exe.config

My file was located here: C:Program FilesMicrosoft Visual Studio 9.0Common7IDEdevenv.exe.config

4) Modify the endpoint and bindings of my client app. (myapp.exe.config)

5) Modify the endpoints and bindings of my WCF service. (mywcfservice.exe.config)

zemna

Programmer/Web/Mobile/Desktop

You may also like...

Leave a Reply