I found this problem when i try to do any of httpweb request behind proxy and i got error of “407 proxy authentication required”. Normally your company has its own proxy server and sometimes you want to call webservice or reading XML from any website or sending xml to payment gateway.
The workaround this is to use proxy properties of your httpwebrequest variable. this is some snippet
Dim objRequest As HttpWebRequest objSendXML = New XmlDocument objRequest = WebRequest.Create(strPaymentURL) objRequest.Method = "POST" objRequest.ContentLength = strSend.Length objRequest.ContentType = "text/xml" 'for development only!!! have to be blocked on production objRequest.Proxy = New System.Net.WebProxy("http://proxy-syd:8080", True) objRequest.Proxy.Credentials = CredentialCache.DefaultCredentials
Now you can call your webservice or reading xml behind the proxy server