zoukankan      html  css  js  c++  java
  • WCF – System.ServiceModel.FaultException

     

    WCF – System.ServiceModel.FaultException

     

     

    I’m sure you will encounter the following exception when working with WCF.

     

    System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

     

    In order to get real exception information, you need turn on IncludeExceptionDetailInFaults attribute.

      <system.serviceModel>

        <services>

          <service name="Products.ProductsServiceImpl" behaviorConfiguration="ProductsBehavior">

            <endpoint address="" binding="basicHttpBinding" contract="Products.IProductsService" />

          </service>

        </services>

        <behaviors>

          <serviceBehaviors>

            <behavior name="ProductsBehavior">

              <serviceDebug includeExceptionDetailInFaults="true" />

              <serviceMetadata httpGetEnabled="true" />

            </behavior>

          </serviceBehaviors>

        </behaviors>

      </system.serviceModel>

     

     

     

  • 相关阅读:
    利用QObject反射实现jsonrpc
    使用libuv实现生产者和消费者模式
    std::function赋值的几种方法
    Qt postEvent
    Qt由pcm数据生成wav文件
    Qt websocket协议的实现
    Python中json.dump() 和 json.dumps()的区别
    Appium环境搭建(Mac)
    Mac上搭建Python集成环境
    Mac OS终端利器iTerm2(完美替代bash)
  • 原文地址:https://www.cnblogs.com/rickie/p/778593.html
Copyright © 2011-2022 走看看