Proxy with authentication

Jul 2, 2013 at 1:18 PM
Edited Jul 2, 2013 at 1:25 PM

I am trying to connect through a proxy that needs authentication with no luck. Is there by any chance a way to use a WebProxy object? Or do you have any ideas on how to achieve this?

Jul 2, 2013 at 10:23 PM

I haven't needed to do this myself, but I recall someone mentioning that you might be able to use the config file because the LinqToTwitter network communication uses HttpWebRequest:

Dec 9, 2013 at 6:45 PM

I am having the same problem. I think this maybe due to my corporate firewall environment that requires a proxy.

System.AggregateException: One or more errors occurred. ---> System.Net.Http.Htt
pRequestException: An error occurred while sending the request. ---> System.Net.
WebException: The remote server returned an error: (407) Proxy Authentication Re
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, Tr
ansportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar

@ ciprianp where you able to resolve this issue via the app config file using the internet explorer proxy settings in the MSDN support page.

Dec 9, 2013 at 7:11 PM
Edited Dec 9, 2013 at 7:24 PM

Sorry that I didn't leave feedback with my final solution sooner.
I ended up using
System.Net.HttpWebRequest.DefaultWebProxy = yourProxy;
and it worked.

Probably it works just as well if you use the app.config. Haven't tried it though.