简体   繁体   English

将ASP.NET MVC 5应用程序部署到Win Server 2008

[英]Deploying ASP.NET MVC 5 Application to Win Server 2008

I would like to test my ASP.NET MVC application on my tablets and phones on my home local network. 我想在我的本地局域网上的平板电脑和手机上测试我的ASP.NET MVC应用程序。

How would I access the website from such devices? 我将如何通过此类设备访问网站?

Is it possible to deploy the application to some folder on my Win Server VM and then access the folder by typing that URL in mobile web browsers such as Safari? 是否可以将应用程序部署到Win Server VM上的某个文件夹,然后通过在Safari等移动Web浏览器中键入该URL来访问该文件夹?

Has anyone done this? 有人这样做吗?

I will offer up 2 possible solutions here. 我将在这里提供2种可能的解决方案。

  1. Learn how to deploy your app to a web server. 了解如何将您的应用程序部署到Web服务器。 Here is a microsoft article explaining how to do this at home, in a relatively quick way, and learning skills you may need in the future. 这是一篇Microsoft文章,解释了如何在家中以相对较快的方式进行此操作以及将来可能需要的学习技能。 This is the best way if you need to learn more about deploying. 如果您需要了解有关部署的更多信息,这是最好的方法。 it should get easier each time you do it: http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/deploying-to-iis 每次您执行此操作都应该会更轻松: http : //www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/deploying-to-iis

  2. Leech off your development instance, which requires traffic to come in on localhost/127.0.0.1 which will require a traffic-redirector / port-forwarder on your host instance(your developement web server on your host instance has a 'code name', its called Cassini!, its good to know this name when researching about it...) Look at this link, and remember that your IP Address and Port number is most likely not the same as the one in the solution: Debugging ASP.NET MVC3 application hosted on Local IIS Webserver 窃取您的开发实例,这需要流量进入localhost / 127.0.0.1,这将需要主机实例上的流量重定向器/端口转发器(您的主机实例上的开发Web服务器具有“代号”,称为Cassini !,在研究该名称时很高兴知道这个名称...)请查看此链接,并记住您的IP地址和端口号很可能与解决方案中的IP地址和端口号不同: 调试ASP.NET MVC3本地IIS Web服务器上托管的应用程序

...dont forget about your windows firewall, too... ...也不要忘记Windows防火墙...

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

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