远程服务器返回了错误: NotFound。 WCF silverlight 调用WCF的时候有时会出现“远程服务器返回了错误: NotFound。”

的错误 我上网查了下说可以用以下方法解决

在WCF服务的类中加上 [ServiceBehavior(IncludeExceptionDetailInFaults = true)]

然后在调用此服务的silverlight的初始化方法中加上

 

bool registerResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);

bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);

 

相关文章:

  • 2021-12-03
  • 2021-06-07
  • 2021-05-30
  • 2021-12-12
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-02-08
  • 2021-12-12
相关资源
相似解决方案