SilverLight调用WCF”远程服务器返回了错误: NotFound”的排解
2010-02-02 10:30
344 查看
远程服务器返回了错误: NotFound,该错误一般为WCF调用不成功,SL的错误类型是CommunicationException,但是具体的错误类型及信息不完整,通过以下方法,可以使错误信息更加完成。
在WCF服务的类中加上
[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
然后在调用此服务的silverlight的初始化方法中加上:
bool registerResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
在WCF服务的类中加上
[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
然后在调用此服务的silverlight的初始化方法中加上:
bool registerResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
相关文章推荐
- SilverLight调用WCF”远程服务器返回了错误: NotFound”的排解
- Silverlight 调用WCF 远程服务器返回了错误: NotFound
- Silverlight 调用WCF 远程服务器返回了错误: NotFound
- Silverlight连接WCF--错误"远程服务器返回了错误NotFound”
- silverlight3程序部署在IIS7.5 出现 Error:Unhandled Error in Silverlight Application 远程服务器返回了错误: NotFound
- WCF中远程服务器返回了一个错误: NotFound. 错误的解决思路
- Silverlight提示“Load 操作失败。远程服务器返回了错误: NotFound”
- 远程服务器返回了错误: NotFound。 WCF
- WCF 远程服务器返回了错误: NotFound
- wcf 远程服务器返回了错误 NotFound原因之一
- 远程服务器返回了错误: NotFound。 (大全)
- 远程服务器返回了错误 :NotFound
- 有时会报远程服务器返回了错误: NotFound
- Silverlight :服务器返回错误: NotFound 错误
- 一个关于WCF调用远程链接返回405错误不允许使用此方法的问题
- 调用部署在本机IIS服务器的WCF服务并返回数据DataTable,一直报错:远程主机强迫关闭了一个现有的连接,但是服务访问正常
- WCF(远程服务器返回错误: 400 错误的请求)
- 远程服务器返回了错误 NOTFOUND
- WCF错误远程服务器返回了意外响应: (413) Request Entity Too Large。解决方案
- kies进入APPS的时候,提示:【远程服务器返回错误:(502)错误的网关】解决办法