大佬教程收集整理的这篇文章主要介绍了Silverlight 调用WCF 远程服务器返回了错误: NotFound,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
silverlight调用wcf有时很不稳定,同样调用一个方法,有时正确,有时会报远程服务器返回了错误: NotFound。主要问题是:WCF服务本身对数据包进行了限制,最大不能超过65535。可是我想不通的是,当我发送200多记录时,都正常,可是发送一条记录时,才会报这样的错。按数据限制的说法,也说不通,真是头痛。
看一下如何来配置WCF服务器。
<system.serviceModel>
<bindings>
<basichttpBinding>
<binding name="BasichttpBinding_IDataservice" maxBufferPoolSize="2147483647" maxReceivedmessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNaMetableCharCount="2147483647" maxStringContentLength="2147483647" />
</binding>
</basichttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyNetDisk.Web.FileserviceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractserializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHosTingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="MyNetDisk.Web.FileserviceBehavior" name="MyNetDisk.Web.Fileservice">
<endpoint address="" binding="basichttpBinding" contract="MyNetDisk.Web.Fileservice" bindingConfiguration="BasichttpBinding_IDataservice" /> <endpoint address="mex" binding="mexhttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel>
以上是大佬教程为你收集整理的Silverlight 调用WCF 远程服务器返回了错误: NotFound全部内容,希望文章能够帮你解决Silverlight 调用WCF 远程服务器返回了错误: NotFound所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。