开发者

WCF / Silverlight requests timing out after 30 secs with WebRequest.RegisterPrefix

开发者 https://www.devze.com 2023-04-11 18:27 出处:网络
I have a WCF webservice and a SL4 client which always times out after 30secs with a ConnectionTimeout exception.

I have a WCF webservice and a SL4 client which always times out after 30secs with a ConnectionTimeout exception.

After much time spent messing with WCF timeout params etc, I found that the problem was being caused by a call to WebRequest.RegisterPrefix when my application starts up.

This call is performed so i can receive FaultExceptions in the SL client, and display the text of the problem to my users. This is a recommended solution by Microsoft:

See http://msdn.microsoft.com/en-us/library/ee844556(v=vs.95).aspx

If i remove this line, then great, I can upload big files to the server and it doesn't time out (90 secs plus - timeout is set to 2mins).

Does anyone know why this is timing out after 30secs, and more importantly, whether there is a way to increase the tim开发者_StackOverfloweout? Or is this a bug?

Any help greatly appreciated. Thanks.


This is not a bug.

You can increase the Timeout in your 'web.config'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号