This could be due to the service endpoint binding not using the HTTP protocol

前端 未结 22 2448
梦谈多话
梦谈多话 2020-12-22 23:10

I have a WCF Service running fine on my local machine. I put it on the servers, and I am receiving the following error:

An error occurred while receiv

22条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-22 23:52

    In my instance, the error was generated because one of my complex types had a property with no set method.

    The serializer threw an exception because of that fact. Added internal set methods and it all worked fine.

    Best way to find out why this is happening (in my opinion) is to enable trace logging.

    I achieved this by adding the following section to my web.config:

    
      
        
          
            
            
          
        
        
          
            
            
          
        
      
      
    
    

    Once set, I ran my client, got exception and checked the 'Traces.svclog' file. From there, I only needed to find the exception.

提交回复
热议问题