允许远程访问asp.net中的localhost网站

时间:2021-04-02 18:11:48

Hi I have developed a website and is on a machine(localhost), I want a friend to access it from outside my network, I have done some research and am being pointed to port forwarding as a solution. Any good links I can refer too will be highly appreciated.

嗨,我已经开发了一个网站,并在一台机器(localhost),我想要一个朋友从我的网络外部访问它,我做了一些研究,并指出端口转发作为一种解决方案。我也可以参考的任何好的链接都将受到高度赞赏。

2 个解决方案

#1


2  

Not a programming question, but how to setup your router.

不是编程问题,而是如何设置路由器。

The router, especial the adsl modems that you probably use, they not forward outside request to inside network, for security and because they are not know where to send them.

路由器,特别是您可能使用的adsl调制解调器,它们不会将外部请求转发到内部网络,以确保安全性,因为它们不知道将它们发送到何处。

So on the setup of your router you need first of all forwarder the outside calls to your pc.

因此,在设置路由器时,首先需要转发外部电话到您的电脑。

Now, this have two parameters, what port send to what inside ip.

现在,这有两个参数,什么端口发送到ip内部。

How to forward ports on your router page with images and examples.

如何使用图像和示例转发路由器页面上的端口。

Let say that you have a pc behind the router at ip 192.168.1.100, and setup there a local iis on 80, then you need to setup the router so when is accept call on port 80, to send it to 192.168.1.100

假设你在ip 192.168.1.100的路由器后面有一台电脑,并在80上设置了一个本地iis,那么你需要设置路由器,以便接受80端口的呼叫时,将其发送到192.168.1.100

Now you need to know what ip to give to your friend to try to make call to you, you can find it using the http://www.whatismyip.com/ The ip they see you outside is the one your friend must type on browser.

现在你需要知道要给你的朋友打电话给你的ip,你可以使用http://www.whatismyip.com/找到它。他们看到你外面的ip是你的朋友必须输入的那个浏览器。

And then need to make your iis run, and allow your pc firewall to accept calls on port 80.

然后需要让你的iis运行,并允许你的PC防火墙接受端口80上的呼叫。

#2


0  

@Aristos gave you the answer. But have in mind that some internet providers block port 80 so you might have to change to 88 for example. And your friend will access it as

@Aristos给了你答案。但请记住,一些互联网提供商会阻止端口80,因此您可能需要更改为88。而你的朋友将访问它

http://your_external_ip:88

#1


2  

Not a programming question, but how to setup your router.

不是编程问题,而是如何设置路由器。

The router, especial the adsl modems that you probably use, they not forward outside request to inside network, for security and because they are not know where to send them.

路由器,特别是您可能使用的adsl调制解调器,它们不会将外部请求转发到内部网络,以确保安全性,因为它们不知道将它们发送到何处。

So on the setup of your router you need first of all forwarder the outside calls to your pc.

因此,在设置路由器时,首先需要转发外部电话到您的电脑。

Now, this have two parameters, what port send to what inside ip.

现在,这有两个参数,什么端口发送到ip内部。

How to forward ports on your router page with images and examples.

如何使用图像和示例转发路由器页面上的端口。

Let say that you have a pc behind the router at ip 192.168.1.100, and setup there a local iis on 80, then you need to setup the router so when is accept call on port 80, to send it to 192.168.1.100

假设你在ip 192.168.1.100的路由器后面有一台电脑,并在80上设置了一个本地iis,那么你需要设置路由器,以便接受80端口的呼叫时,将其发送到192.168.1.100

Now you need to know what ip to give to your friend to try to make call to you, you can find it using the http://www.whatismyip.com/ The ip they see you outside is the one your friend must type on browser.

现在你需要知道要给你的朋友打电话给你的ip,你可以使用http://www.whatismyip.com/找到它。他们看到你外面的ip是你的朋友必须输入的那个浏览器。

And then need to make your iis run, and allow your pc firewall to accept calls on port 80.

然后需要让你的iis运行,并允许你的PC防火墙接受端口80上的呼叫。

#2


0  

@Aristos gave you the answer. But have in mind that some internet providers block port 80 so you might have to change to 88 for example. And your friend will access it as

@Aristos给了你答案。但请记住,一些互联网提供商会阻止端口80,因此您可能需要更改为88。而你的朋友将访问它

http://your_external_ip:88