How do you publish an ASP.net MVC application from Visual Studio 2013 to your local network?

前端 未结 5 1508
耶瑟儿~
耶瑟儿~ 2021-01-28 00:19

I made a simple ASP.net MVC web application in Visual Studio 2013, and I want to deploy it so it can be accessed from the browser on other computers on my local network. I have

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-28 00:40

    When I want to use IIS Express within Visual Studio for development, but allow local network users to see a version of my site, I tend to create a publish profile in VS that publishes to the local file system (e.g. C:\Publish\). Then from IIS Manager create a new website pointed to that same folder and it should be accessible to you via http://localhost and to network users via http:// or http://.

    You will need to add an exception to Windows Firewall to permit HTTP requests (i.e. port 80) through to your local machine, but if you have configured IIS correctly they should see the website.

    It is possible to make IIS Express available to remote clients but that's not what it's designed for so really you're better off going down the IIS route since this will allow you to test the configuration as it would be on a live/production setting at the same time.

提交回复
热议问题