Authorization to a proxy server via HTTP

I've changed to a proxy server and that needs proxy authentication. My requests now fail with: "407 proxy authenticate required", although I tried using the "USER" and "PASSWORD" property.

Date Entered: 12/11/1997    Last Updated: 06/04/2004

The .User and .Password properties calculate the authorization string and send it to the web site. For proxy authentication you should use the ProxyUser and ProxyPassword properties.

In older versions of IPWorks, it is necessary to set the Proxy-Authorization header yourself manually:

To calculate the authorization string you may assign values to .User and .Password properties and read the .Authorization property as shown in the following example. (This needs to be done only once to calculate the Authorization string using the Basic Authentication scheme.)

     'calculate the authorization string
     HTTP1.User = "myname" 'put your proxy login name here
     HTTP1.Password = "mypassword" 'put your proxy password here
     HTTP1.OtherHeaders = "Proxy-Authorization: " + _
          HTTP1.Authorization + chr(13) + chr(10)

     'empty string because authorization is only for the proxy
     HTTP1.User = "" 
     HTTP1.Password = ""

All your requests going through the proxy server should contain the "Proxy-Authorization: ..." header at .OtherHeaders property.

Please check the help files for help on individual properties.

Please remember also that changing the server value when assigning a value to .URL property clears the values for User and Password. This is for security reasons.


We appreciate your feedback.  If you have any questions, comments, or suggestions about this entry please contact our support team at kb@nsoftware.com.