简体   繁体   English

访问IIS上托管的Web应用程序

[英]Accessing web application hosted on IIS

I have a .net web application which I have hosted on IIS. 我有一个托管在IIS上的.net Web应用程序。 when I run it, it is working fine. 当我运行它时,它运行良好。 I have assigned the hostname as my static IP address. 我已将主机名分配为我的静态IP地址。 So i can access my application as http://xxx.xxx.xx/default.aspx . 因此,我可以以http://xxx.xxx.xx/default.aspx访问我的应用程序。 When I try to access the same address from another computer,I'm not able to access. 当我尝试从另一台计算机访问相同的地址时,我无法访问。 Am I missing something? 我想念什么吗?

Does your machine's IP Address start with: 192.168 (eg: 192.168.1.15 , 192.168.0.35 ) or 10. (eg 10.0.0.45 )? :请问您的机器的IP地址与启动192.168 (如: 192.168.1.15192.168.0.35 )或10. (例如10.0.0.45 )?

If so, these are PRIVATE IP Addresses , and cannot be accessed from other computers outside your local network. 如果是这样,则它们是PRIVATE IP地址 ,无法从本地网络之外的其他计算机访问。

You would need to configure your router to forward port 80 to your private IP, and then use the address you see on Google when searching for What is my IP 您需要将路由器配置为将端口80转发到您的专用IP,然后使用搜索“我的IP”时在Google上看到的地址

The details on configuring your router are more suited to Superuser.com than Stackoverflow. 在配置路由器的细节更适合Superuser.com比#1。

You should map your IP address to the hostname you set. 您应该将IP地址映射到您设置的主机名。

Say you define your hostname as thunderbolt.com 假设您将主机名定义为thunderbolt.com

You need to modify your windows/system32/etc/hosts file and add the mapping for that hostname to your localhost IP. 您需要修改windows/system32/etc/hosts文件,并将该主机名的映射添加到本地IP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM