错误:使用WCF服务

编程入门 行业动态 更新时间:2024-10-24 20:22:23
本文介绍了错误:使用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服务

本文发布于:2023-11-07 11:23:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566316.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   WCF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!