[英]Hosting ASP.NET Application on LAN Network
We have hosted Asp.Net application on local computer in LAN network. 我们已经在局域网中的本地计算机上托管了Asp.Net应用程序。 This application is accessible by other LAN computer via ip address.
其他LAN计算机可以通过ip地址访问此应用程序。
However If I am trying to bind the site with host name for example ( mysite.com ), the other computers in LAN, they are getting unkown host error. 但是,如果我尝试使用主机名(mysite.com)绑定站点,则局域网中的其他计算机将出现未知主机错误。
Would anybody please help me in this regard ? 在这方面有人可以帮我吗? how to make other system in LAN to access this application via host name instead of IP address.
如何使局域网中的其他系统通过主机名而不是IP地址访问此应用程序。 ?
?
Thanks PK 谢谢PK
You actually need to run your own DHCP and DNS server on your local network. 实际上,您实际上需要在本地网络上运行自己的DHCP和DNS服务器。
Alternative a quick and dirty solution is to modify the host
file on (all) your local network computers (are less than 20 ?) and add there your site name in a line eg: 另一种快速而肮脏的解决方案是修改(全部)本地网络计算机(小于20?)上的
host
文件,并在其中添加您的站点名称,例如:
192.168.1.140 www.localsite.com
192.168.1.140 www.localsite.com
The host
file is located at c:\\Windows\\System32\\drivers\\etc\\hosts
host
文件位于c:\\Windows\\System32\\drivers\\etc\\hosts
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.