Chau
Chau

Reputation: 5570

C# How to communicate between 2 servers

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.

Upvotes: 3

Views: 1871

Answers (2)

Jacques Bosch
Jacques Bosch

Reputation: 2264

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

Upvotes: 1

David Neale
David Neale

Reputation: 17028

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.

Upvotes: 1

Related Questions