开发者

Can I set the SoapHttpClientProtocol Timeout property via a config file?

When I create the web reference for a web service, Visual Studio magically creates a Se开发者_JAVA技巧ttings class which allows me to change the referenced web service URL via the application config. Very useful for changing between development and production servers without rebuilding code.

I haven't been able to find a similar mechanism for the Timeout (or any other) property. Is there one?

(For clarity: I'm talking about the client-side code, with a web service reference derived from SoapHttpClientProtocol.)

Thanks!


You could using the Settings feature to define your own settings for Timeout and other properties. You could then write the code to read the property rather than a magic number right in your code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜