locked
error code: 407 proxy authentication required RRS feed

  • Question

  • Hi,

    I've created a Windows Forms app that consumes an ADO.NET Data Services Web Service.

    Users that aren't behind a proxy server/firewall can use the program without any problems. On the other hand when the user is behind a proxy server, ISA Server in my case they can't connect to the Webservice.

    The app won't let the user connect or authenticate the user to the Webservice.

    Instead it throws this error:

  • Error Code: 407 Proxy Authentication Required. The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. (12209)
  • Can anybody help me to solve this issue.

    Regards,

    Jeroen

Monday, June 22, 2009 3:07 PM

Answers

  • Hi , It looks like the ISA Server requires the WebProxy on the client context to have appropriate credentials. Try this snippet of code which hooks into the client context's sending request event and changes the proxy appropriately.

    contextInstance.SendingRequest += HookupProxyCredentials; 
    
    public void HookupProxyCredentials(object sender,SendingRequestEventArgs eventArgs)
    { 
     WebProxy webproxy = new WebProxy(); 
     webproxy.Credentials = new NetworkCredential("", "", "");  
    eventArgs.Request.Proxy = webproxy; }

    Here's the relevant thread from another forum that might be helpful.

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/51fa71cd-1007-442a-9f80-2961e6372944/

     


     

    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj

    Monday, April 19, 2010 4:48 PM
    Moderator