views:

55

answers:

2

I have a website running ASP.NET (C#) on server A. I need my website to access a webservice on server B. server B will only accept incoming requests if the requestee is located within a certain IP range and server A is not within this range.

I have a server server C which is located within the IP range and the only thing blocking server A from server C is a firewall (which I have access to). It must be possible to create a hole in the firewall between server A and server C, but my question is:

How do I relay the request from server A to server B via server C?

I need the response from server B to get back to server A also :)

Thanks in advance.

+1  A: 

Take a look a HTTP Proxies, there are lots of open-source ones but I haven't had any experience working with them so can't recommend one.

Failing that, look into socket programming (http://www.codeproject.com/KB/IP/socketsincsharp.aspx) - you could write a socket-based interface between server A and server C, server C will then send the request on and marshall the response back to server A.

David Neale
+1  A: 

You could take a look at WCF; perhaps creating an intermediate service on server C that mediates between the other 2.

Jacques Bosch
It seems like WCF is a good solution so far. Thanks for forcing me into trying WCF ;)
Chau