This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17023|Reply: 0

[WCF/Web Servics] Due to an internal error, the server was unable to process the request. For more information about the error, open In...

[Copy link]
Posted on 7/19/2016 9:02:12 PM | | |
---------------------------

---------------------------
Due to an internal error, the server was unable to process the request. For more information about the error, turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from <serviceDebug> Configure Behavior) on the server to send the exception information back to the client, or open a trace to each Microsoft .NET Framework SDK document and check the server trace logs.
---------------------------
Are you sure   
---------------------------


When debugging a WCF program, you may sometimes encounter the following error:
System.ServiceModel.FaultException: 由于内部错误,服务器无法处理该请求。有关该错误的详细信息,请打开服务器上的 IncludeExceptionDetailInFaults (从 ServiceBehaviorAttribute 或从 <serviceDebug> 配置行为)以便将异常信息发送回客户端,或在打开每个 Microsoft .NET Framework 3.0 SDK 文档的跟踪的同时检查服务器跟踪日志。
Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   At System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage, methodCall, ProxyOperationRuntime operation)
   In System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   Some program prompts are omitted




The specific reason is that on the server side of WCF
<serviceDebug includeExceptionDetailInFaults="false"/>
If it is set to false and modified to true, you can see the specific error message on the client





Previous:Type 'System.IO.FileStream' with data contract name 'FileStream:http://schema...
Next:WCF error: 413 Request Entity Too Large
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com