I am using squid proxy server to authenticate the client before passing on the request to public network.
I haven't set HttpWebRequest.Proxy
object so I am assuming that the web request will take the default window credentials and pass on to the proxy server.
I have added an entry of the user to squid proxy as well, but I am getting the following error while making the request.:
(407) Proxy Authentication Required.
In squid logs, I am getting this:
TCP_DENIED/407 3722 CONNECT
I have inserted the following block in App.config
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy
usesystemdefault="true"/>
</defaultProxy>
</system.net>
To verify if there is discrepancy between the user credentials registered with squid and my windows user credentials. I tried opening a public website through browser which prompted for credentials as the request was passing through proxy server ( which I have set under Internet Options ), after entering windows credentials I was able to access that site.
Also, i checked through Fiddler ( a tool to check network traffic ) that the request to that proxy server didn't have Proxy-Authorization Header.
Can anybody please check and tell if something I have missed or I have made any mistake.