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.
精彩评论