WCF 4 default time outs?
My last experience with WCF 3.0 was pretty bad, because of this I reverted to using ASMX. I now see that WCF 4.0 seems to provide a better configuration model, my only concern is that with WCF 3.0 I had a lot of timeouts on extended ser开发者_开发技巧vice calls, however with asmx these timeout values can be configured through IIS and also accept the negative integer value of -1.
Does WCF 4.0 default configuration support getting timeout values from IIS, or once again do you need to configure the timeouts to handle extended web service calls that take time to complete (could be up to 6 hours).
Thanks
In WCF you have configuration level control over timeouts on both servers and clients by editing the binding configuration. Since WCF was not designed to be coupled with IIS I don't think you can inherit the timeouts from IIS so you might have to set them in both places.
Check this link for the documentation on the basicHttpBinding element (which is used for SOAP 1.1): http://msdn.microsoft.com/en-us/library/ms731361.aspx
And this one for details on different timeout configurations in WCF: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/84551e45-19a2-4d0d-bcc0-516a4041943d/
I have personally used the timeout configurations in different .Net 3.5 projects and they worked for me.
WCF by nature is transport agnostic so the configuration has to accommodate for transport types not having timeout.
Problem in HTTP is if you have one timeout for HTTP and one explicitly for the WCF, there will be a conflict and that is why you have to define them separately.
I believe WCF is a big fudge, an being transport agnostic causing performance degradation while easing with deployment and configuration. Having said that, I think it is far superior to ASMX, IMHO :)
精彩评论