If I have the following setting in my app.config file. It is a setting I need to make sure my WCF client can negotiate the default proxy server.
<system.net> <defaultProxy enabled='true' useDefaultCredentials='true'></defaultProxy> </system.net>
Unfortunately, I can’t add to the app.config file in my environment. How do I ensure these settings by setting them at runtime?
I think what you do is create a
System.Net.WebProxyobject, then set the appropriate variables, then set theSystem.Net.WebRequest.DefaultWebProxy:This post sort of talks about the whole thing: Link
Hope that helps!