`
hulunberbus
  • 浏览: 855398 次
文章分类
社区版块
存档分类
最新评论

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>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics