Reputation: 29468
For the project I'm working on, I need to directly call the IP address of a computer within our C# environment. We are using asp.net / mvc 3 and the customer facing website has a controller that will expose an endpoint to hit from within the admin area of the site. This controller action will then call another private internal ip address that actually does the ground work. Basically there are two machines, one is customer facing, and the other machine is more for setup.
<private_ip_address>/admin/do_something_private
Does C# have a direct way to call an IP address like this?
Upvotes: 0
Views: 485
Reputation: 5203
Your internal machine will have an external IP address. You'll need to point your external L website to the external IP address of your modem/router and use your modem/router to route the request to the internal IP address. You can also put your internal machine on your router's DMZ but that's usually a bad idea.
Upvotes: 0
Reputation: 14830
As long as the PCs can see each other you can always establish a communication between them via HTTP. Just make sure you know how the endpoint is configured and what kind of "requests" it understands. Yet, the client must be aware of any security implementation on the server side in order to successfully authenticate the request. That's as abstract as I can get provided that your question is way too abstract
Upvotes: 1