views:

767

answers:

2

We have a problem with our project. We make web services with C# and a client for the web services. In our office the client work fine, but in production we have a problem with proxy. Proxy is configured in Windows Internet Properties. The client has to connect to http:\aaa.com and http:\aaa.com is a proxy exception. But the client doesn’t connect. In the proxy log we can see that the client go through the proxy and ignore the proxy exceptions. Why doesn’t the client take the exception of Internet Properties?

EDIT: Sorry for the mistake the proxy configuration is *.aaa.com Using Intenet Explorer I can access to web services

A: 

Do you actually have a backslash instead of a forward slash in your configured URL? I would have assumed that was a typo, but it's possible that it's in your actual config - and that the native webclient will cope with it but the proxy doesn't.

What happens if they try to access the URL using Internet Explorer? Does that handle the exception properly?

Jon Skeet
+1  A: 

I can't remember which settings .NET uses (I suspect WinHTTP), but one simple thing to try is (at the command line):

proxycfg -u

This imports the Internet Explorer proxy settings into WinHTTP.

Beyond that, you can also tweak the proxy settings via configuration (app.config/web.config/machine.config/etc) via the configuration/system.net/defaultProxy node. Personally, I'd try to avoid this (configuration) option - it just increases the number of things you need to remember to maintain!

Marc Gravell