WCF Data Service - How To Diagnose Request Error?

前端 未结 1 1539
别那么骄傲
别那么骄傲 2020-12-09 16:52

I have an application which will use WCF to serve up various chunks of data to clients. However, due to the size of some of the sets of data that will be returned (and that

相关标签:
1条回答
  • 2020-12-09 17:42

    It sounds like you are only seeing the generic "Response Error" message. To see the details of that message you need to modify the behavior to "includeExceptionDetailInFaults".

    You can change the behavior in your config file.

    <services>
        <service name="DataServiceHost"
                 behaviorConfiguration="DataServiceBehavior">
            <endpoint name="DataServiceHost"
                      address=""
                      binding="webHttpBinding"
                      contract="System.Data.Services.IRequestHandler" />
    
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="DataServiceBehavior">
                <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    
    0 讨论(0)
提交回复
热议问题