How to make My PC work as Host Server?

别等时光非礼了梦想. 提交于 2020-06-09 05:40:07

问题


I have an ASP.NET web application that has been hosted in IIS local Machine.

My Question is :

Is there any free or paid method that allows browsing this web application from the internet as Host Server ?

Thanks


回答1:


The easiest way to to publish it directly onto the internet. You do run the risk of attackers then being able to attach your machine, so you will need to brush up on your security skills. It might be worth looking into one of the free hosting options from AWS, Azure or Google Cloud.

To use your local machine as a web server, first, configure it to use a static IP. Its been a while since I've done it on windows, but this looks about right http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/.

Next you will need to configure port forwarding on your model. You want to send all traffic on port 80 to your machine, using its new fixed IP address. If your using HTTPS as well, configure port 443 to go to your machine. There are too many different modem brands, all of which handle this slightly differently, to consider offering any more help on this. You will need to do some reading up on your particular modem for step-by-step instructions.

If your internet connection is using a fixed IP, then you can stop here.

If not, or if you just want a domain name, then its worth signing up for a dynamic dns service. I use No-ip, its free, it integrates with my modem and I haven't had any problems with it in the last few years. Once this is in place, you will be able to hit your webserver just like a real one. Using something like "http://mypc.no-ip.biz/mydemoapp/

But again, be warned about exposing your machine on the internet. There are nasty people out there who love to hijack other peoples computers.

Update: This should give you some guidance on port forwarding

http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/

Try http://www.noip.com I just logged in and it seemed happy. Otherwise, have a click through all the settings in your modem looking for ddns or dynamic DNS. There is usually a drop down of all the providers that it will talk to. And some providers have apps that you run on your PC , which is easier that working with the modem for some. (Or for models that don't support ddns.)



来源:https://stackoverflow.com/questions/38350171/how-to-make-my-pc-work-as-host-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!