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

前端 未结 5 1507
耶瑟儿~
耶瑟儿~ 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:28

    You need to enable IIS on the host as IIS Express is not built with that in mind. Its for debugging purposes.

    You've also not mentioned your binding configurations or your app pool settings.

    Here is a comprehensive tutorial on how to publish your application using IIS IIS Video tutorial

    You will need to ensure the binding that you specify is available across the network and that the connecting clients have permissions.

    0 讨论(0)
  • 2021-01-28 00:31

    The issue was that ASP.net was not registered with IIS

    1. Opened command prompt as administrator
    2. Navigated to C:\Windows\Microsoft.NET\Framework64\v4.0.30319
    3. Ran aspnet_regiis -iru

    Now web app runs in IIS http://www.asp.net/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-%28remote-agent%29

    0 讨论(0)
  • 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\<yourwebsite>). 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://<your-pc-name> or http://<your-local-ip>.

    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.

    0 讨论(0)
  • 2021-01-28 00:41

    Check this, and old version of the same question. I'd bet you need to install IIS locally

    Use Visual Studio web server in local network

    0 讨论(0)
  • 2021-01-28 00:48

    You can use IIS Express which comes with visual studio 2013. I've used this method to allow other members of the staff to access the website that is in my computer. Scott Hanselman has done a great post which I use every time when I want to expose a website hosted in local iis express to others in the same network.

    http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

    If you have any queries, let me know. Hope this helps

    enter image description here

    0 讨论(0)
提交回复
热议问题