ASP.NET MVC, Node.JS. Can they interact?

Can an ASP.NET MVC application somehow interact (for example, synchronize account data) with websites written on top of NODE.JS and host some of the node-clouds?

+4
source share
2 answers

This is a common problem. If you have two applications written in two different languages ​​or running on two different machines or whatever the reason they might be separated, they can still communicate.

You start one server on one machine and another on another. Servers are designed to serve things, so their main function is to listen on the port and respond to incoming requests. But they are not limited to this. They can also send requests! There is no reason why a server cannot be a client at the same time.

Basically, you need to add client functions to the server so that it can fulfill requests to other servers. It is much easier to do this in the context of web development, because we already have well-known REST (and most languages ​​have libraries for creating and analyzing REST requests and responses).

Also keep in mind that you need to implement some security features while doing this. For example, if your Node.JS server is serving something only for your ASP.NET server, you can restrict this Node.JS server, so it will not host this content on the entire Internet.

+1
source

Yes, you can.

John Galloway article on this exact topic .

+3
source

All Articles