locked
The request failed with HTTP status 407: Proxy Authentication Required (the ISA server requires authorization to fulfill the request. access to the web proxy filter is denied.)

    General discussion

  • I'm new to webservice. I writed an example to work with a web service which is supplied on Internet (its url: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx ) when i tried running i got an error message as System.Net.WebException was unhandled
      Message="The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )."

    I had found some solutions such as:
    + using ISA firewall
    + configuring proxy from Machine.config
    + inside coding

    The first:  I used ISA firewall but i still got the same error, my problem didn't resolve. I guessed that is because ISA firewall needn't use Credentials (username/password).

    The second:
     I tried coding in my source, it was okie. This solution is good because following this way i can get defaultCredentials from cache but needn't define straightforwardly my credentials as username/password
    my code is as follows:

    DelayedStockQuote wsStock = new DelayedStockQuote ();
    WebProxy wprxStock = new WebProxy
    ();
    wprxStock.Credentials =
    CredentialCache
    .DefaultCredentials;
    wsStock.Proxy = wprxStock;

    In there, wsStock is my web service. Please declare the System.Net namespace at the top.

    The third: I can configure proxy for my web service from Machine.config file (on my computer its path is C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config) But I really don't like this way.

    Visit following links for more helpful:

    http://support.microsoft.com/default.aspx?id=307220

    http://msdn.microsoft.com/en-us/library/system.net.webproxy.aspx

    http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/f0214f9f-0760-4c9c-8bd8-d7f2b92d0293/?prof=required

    Hope this is helpful for someone


    To go on a head so to get there first
    • Edited by Hualx-vn Wednesday, June 03, 2009 8:13 AM
    Wednesday, June 03, 2009 7:50 AM

All replies

  • Thams dude... the second solution did the trick for me... 

    cheers 
    Thursday, December 10, 2009 1:09 PM
  • Terrific!  Option 2 really saved me.  Thanks much!
    Jeff
    Friday, November 19, 2010 2:11 PM