views:

1399

answers:

4

Is it possible to configure Windows Servers that reside on the same domain such that when a web service call is made from a web app using an IP address, the request does not go via a proxy server?

The web service is running on one of the servers on the domain.

I want to configure IP based security on the server that hosts the web service such that it only allows connections from specific servers. Currently all requests go via the proxy server rendering IPSec problematic.

Within the browser I can specify that requests following a specific pattern should bypass the proxy server. It's essentially this behaviour I want to replicate with the servers.

Thanks

A: 

With ASMX the proxy can be set on the Proxy property:

http://johnwsaundersiii.spaces.live.com/blog/cns!600A2BE4A82EA0A6!435.entry

With WCF, this is part of the binding configuration:

http://blogs.infosupport.com/porint/archive/2007/08/14/Configuring-a-proxy_2D00_server-for-WCF.aspx

jezell
A: 

Jezell, thanks for the response, but the problem is that I don't have control of the proxy and the web service along with all of the web servers are running on a corporate intranet. I do control the web servers so i'm thinking that I should be able somehow to configure the server that hosts the app that needs to call the remote web service to bypass the proxy when sending requests.

I don't think I can make a change programmatically within the asmx or web.config unless i'm missing something significant!

It seems to me that the change would need to be made on the server hosting the app (classic ASP) so as to not utilise the proxy.

Thanks

Reiwoldt
+1  A: 

I think that proxycfg.exe has what you need. Its a console application that is part of standard windows installation. look at:

http://msdn.microsoft.com/en-us/library/aa384069.aspx

Igal Serban
A: 

Proxycfg looked promising, however the following code was what I needed to do it programmatically:-

Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") 

xmlhttp.SetProxy 2,"proxyname:port", "addresses that should bypass the proxy"

this allowed me to specify the addresses that should bypass the specified proxy and it works great now

Thanks for your help

Reiwoldt