远程服务器返回了错误: NotFound。 WCF silverlight 调用WCF的时候有时会出现“远程服务器返回了错误: NotFound。”
的错误 我上网查了下说可以用以下方法解决
在WCF服务的类中加上 [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
然后在调用此服务的silverlight的初始化方法中加上
bool registerResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
玩技术,要学会忍受寂寞--