IncludeExceptionDetailInFaults
全部标签 我有一个运行良好的WCF服务,但我不知道发生了什么变化。我得到这个异常:System.ServiceModel.FaultException:Theserverwasunabletoprocesstherequestduetoaninternalerror.Formoreinformationabouttheerror,eitherturnonIncludeExceptionDetailInFaults(eitherfromServiceBehaviorAttributeorfromtheconfigurationbehavior)ontheserverinordertosendthe
我有一个运行良好的WCF服务,但我不知道发生了什么变化。我得到这个异常:System.ServiceModel.FaultException:Theserverwasunabletoprocesstherequestduetoaninternalerror.Formoreinformationabouttheerror,eitherturnonIncludeExceptionDetailInFaults(eitherfromServiceBehaviorAttributeorfromtheconfigurationbehavior)ontheserverinordertosendthe
如何在不使用App.Config的情况下在代码中设置IncludeExceptionDetailInFaults? 最佳答案 是的,当然-在服务器端,在您打开服务主机之前。但是,这需要您自行托管WCF服务-在IIS托管方案中不起作用:ServiceHosthost=newServiceHost(typeof(MyWCFService));ServiceDebugBehaviordebug=host.Description.Behaviors.Find();//ifnotfound-addbehaviorwithsettingturn