How to listen to a port and send an html to clients.

Ok so I am very very new to networking and web development. I have been going through all the basic tutorials. What I want to do is extremely simple — too simple for all the basic tutorials.

I have a program running on the cloud and I want to make a webpage that has one word “running” if the program is running, and returns nothing if the program has crashed (it crashes a lot).

So I know how to deploy an asp website to IIS using the automated tools in VS. But this doesn’t seem to help me.

I also know how to set up a WCF server and expose an API for a client too connect to. In this scenario the server is listening at the port for communication from the client. This is what I want to do, but instead of communicating to the client with the exposed methods, I just want my program (which is already running and doing more important stuff) to listen at a port and send the client the html website that says “working” when it connects, that’s it.

It seems I want to explicitly do the thing that is automated away by Visual Studio when you create an asp web form and deploy it with IIS.

Does this make sense? Where do I start with this? It should be very simple right? It’s just too simple to find any information on how to do it. Every tutorial is all about making a great interactive website with databases and shit.

submitted by /u/jeff_the_old_banana
[link] [comments]

Leave a Reply