Link to home
Start Free TrialLog in
Avatar of ube100
ube100Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Proxy Authentication require error...

Hi when I run this routine:

 private void VoicepayCCProcess(string sRecordline, string sRequeststring)
        {
            try
            {
                string result;

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://secure.voice-pay.com/gateway/remote_auth");
                request.ContentType = "application/x-www-form-urlencoded";
                request.Method = "POST";

                using (StreamWriter writer = new StreamWriter(request.GetRequestStream()))
                {
                    writer.Write(sRequeststring);
                }
               
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                {
                    result = reader.ReadToEnd();
                }

                // Once we get response back from the voicepay we can construct the output file line by line.
                WriteToFile(sRecordline, result);
            }
            catch (WebException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

On this line:  using (StreamWriter writer = new StreamWriter(request.GetRequestStream()))

I'm getting this error:
the remote server returned an error 407 proxy authentication required

Can you  help me please.
SOLUTION
Avatar of Phiwi Moyo
Phiwi Moyo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Allow ssl-tunnel trough your proxy server. I checked it again my proxy.
Avatar of ube100

ASKER

what is ISA server. I'm just working at my work place and I don't know anything about these settings.
If you just tell me how please.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial