I have internet connection via http proxy, and some of my web applications at localhost need to access internet. Where can i set up proxy settings for them?
Asked
Active
Viewed 5.7k times
1 Answers
35
All I needed was to set system.net in web.config
<system.net>
<defaultProxy>
<proxy
proxyaddress="http://10.0.2.231:42"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
kenorb
- 137,499
- 74
- 643
- 694
Ilya Smagin
- 5,702
- 10
- 39
- 55
-
1how about password and username for proxy? shouldn't we provide that? – Blue Clouds Mar 28 '18 at 16:30
-
1@BlueClouds as far as I know, there is no possibility to configure username and password from the web.config. The only possibility will be to use attribute **useDefaultCredentials=true**, in order to pass host credentials to the proxy. – CesarB Aug 24 '18 at 13:16
-
@BlueClouds check this one https://stackoverflow.com/a/8180854/1837339 and you probably need add the credentials through credential manager too https://answers.microsoft.com/en-us/windows/forum/windows_10-networking/adding-credentials-to-windows-proxy-settings/d6fdab82-6163-4aad-8133-43f7706ceb9c – bigbearzhu May 14 '19 at 01:48