Solved

Proxy Authentication require error...

Posted on 2011-02-22
4
509 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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…
Introduction and Prerequisites This article describes methods for detecting whether a client browser accepts and returns HTTP cookies and whether the client browser runs JavaScript.  Most client browsers will, by default, be configured to use cooki…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 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