Solved

Proxy Authentication require error...

Posted on 2011-02-22
4
510 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:ube100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Assisted Solution

by:Sikhumbuzo Ntsada
Sikhumbuzo Ntsada earned 50 total points
ID: 34950368
If you are behind an ISA server then you need to allow https traffic through if it is already allowed then you need to monitor and see what other traffic is being sent and received.
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 34950391
Allow ssl-tunnel trough your proxy server. I checked it again my proxy.
0
 

Author Comment

by:ube100
ID: 34950437
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.
0
 
LVL 7

Accepted Solution

by:
klakkas earned 200 total points
ID: 34951058
This was such a weird error to handle when I came across it a few weeks ago...

Add this into your app.config file:
system.net>
  <defaultProxy
    useDefaultCredentials="true" >
  </defaultProxy>
</system.net>

And all should work fine...
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question