C # How to communicate between two servers

I have a site running ASP.NET (C #) on server A. I need my website to access the web service on server B. server Bwill accept incoming requests only if the requestor is within a certain IP range and is server Anot in this range.

I have a server server Cthat is within the IP range, and the only thing that blocks server Aout server Cis the firewall (which I have access to). It should be possible to create a hole in the firewall between server Aand server C, but my question is:

How do I pass a request from server Ato server Bthrough server C?

I need an answer from server Bto get back to server Aalso :)

Thanks in advance.

+3
source share
2 answers

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

+1
source

Take a look at the HTTP proxy, there are a lot of open-source, but I had no experience with them, so I can not recommend it.

Otherwise, take a look at socket programming ( http://www.codeproject.com/KB/IP/socketsincsharp.aspx ) - you can write a socket-based interface between server A and server C, server C will then send a request and send a response back to server A.

+1
source

Source: https://habr.com/ru/post/1745756/


All Articles