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:
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.