Silverlight + WCF错误“The remote server returned an error: NotFound.”的解决方法
2009-10-08 06:38
525 查看
今天在项目中发送数据包到服务器端,WCF返回错误信息:The remote server returned an error: NotFound. 经过排查,通过以下步骤进行了解决。
Silverlight企业级项目中,经常要发送大量数据包到服务器端,而WCF服务本身对数据包进行了限制,最大不能超过65535,而我在项目中尝试发送XML大数据包到服务器端,WCF返回以上错误。
起初考试在客户端尝试重新定义BasicHttpBinding对象
1 Dim binding As BasicHttpBinding = New BasicHttpBinding()
2
3 binding.MaxBufferSize = 2147483647
4 binding.MaxReceivedMessageSize = 2147483647
5
然后考虑修改ServiceReferences.ClientConfig文件,增加Buffer 尺寸。
Code
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy
希望能够帮助到大家。
Silverlight企业级项目中,经常要发送大量数据包到服务器端,而WCF服务本身对数据包进行了限制,最大不能超过65535,而我在项目中尝试发送XML大数据包到服务器端,WCF返回以上错误。
起初考试在客户端尝试重新定义BasicHttpBinding对象
1 Dim binding As BasicHttpBinding = New BasicHttpBinding()
2
3 binding.MaxBufferSize = 2147483647
4 binding.MaxReceivedMessageSize = 2147483647
5
然后考虑修改ServiceReferences.ClientConfig文件,增加Buffer 尺寸。
Code
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy
希望能够帮助到大家。
相关文章推荐
- Silverlight + WCF错误“The remote server returned an error: NotFound.”的解决方法
- Silverlight + WCF错误“The remote server returned an error: NotFound.”的解决方法
- Silverlight + WCF错误“The remote server returned an error: NotFound.”的解决方法
- WP8 调用webservice 错误 The remote server returned an error: NotFound 解决
- 关于Silverlight中WebService调用出现CommunicationException The remote server returned an error: NotFound
- Windows Phone中http请求收到The remote server returned an error: NotFound.
- Silverlight调用WCF服务出现The remote server returned an error: NotFound可能原因
- The remote server returned an error: NotFound.
- IIS error:The remote server returned an error: NotFound
- Silverlight调用WebService出现CommunicationException The remote server returned an error: NotFound的一种可能原因
- 解决方法HTTP Status 500 - description The server encountered an internal error () that prevented it from fulfilling this request
- 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法
- WebService:The remote server returned an error: (400) Bad Request
- The remote server returned an error: (404) Not Found
- request 报错The remote server returned an error: (415) Unsupported Media Type.
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- 解决方法:An error occurred on the server when processing the URL. Please contact the system administrato
- The remote server returned an error: (404) Not Found.