错误:使用WCF服务 [英] Error: Consuming WCF Service

查看:85
本文介绍了错误:使用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我从wpf应用程序中消耗wcf服务时遇到错误。



我为wcf服务创建了一个代理,从那里我在我的wpf应用程序的视图模型中访问wcf服务。



例外我得到如下:



由于内部错误,服务器无法处理请求。有关详细信息,请参阅错误,要么在服务器上启用IncludeExceptionDetailInFaults(来自ServiceBehaviorAttribute或来自< servicedebug>配置行为),以便将异常信息发送回客户端,或者根据Microsoft .NET Framework 3.0 SDK文档打开跟踪检查服务器跟踪日志。





谢谢,

Kishore

Hi,

I am getting an error while consuming wcf service from my wpf application.

I created a proxy for wcf service and from there i am accessing wcf service in view model of my wpf application.

Exception i am getting as follows:

"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."


Thanks,
Kishore

推荐答案

从您列出的例外情况来看很难说清楚。您需要在app.config中将includeExceptionDetailInFaults设置为True,以查看更多详细信息异常并从那里开始。



< configuration>

< system.servicemodel>

< behavior>

< servicebehaviors>

< behavior name =debug>

< servicedebug includeexceptiondetailinfaults =true>







.....

.....
It''s difficult to tell from the exception you listed. You need to set the includeExceptionDetailInFaults to True in the app.config, to see more detail exception and go from there.

<configuration>
<system.servicemodel>
<behaviors>
<servicebehaviors>
<behavior name="debug">
<servicedebug includeexceptiondetailinfaults="true">



.....
.....


这篇关于错误:使用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆