A client is unable to use my webpart because he is behind a proxy server and they need to specify a username and password to get past the proxy. I have this in my config file right now:
<system.net>
<defaultProxy>
<proxy usesystemdefault="False" proxyaddress="http://127.0.0.1:8888" bypassonlocal="True" />
</defaultProxy>
</system.net>
Is there a way to supply a username and password to this proxy setting?
I'm not aware of a way to do this in defaultProxy section of web.config, but you can definitely do it from code. Try this:
Web.Config (configuration section):
And then assign
proxy
to the webClient you are using in your webPart.EDIT:
If I had done more homework, I would have realized your problem could have been fixed with one attribute: useDefaultCredentials="true"