Saturday 12 April 2014

Setting up a new MVC4 app on a fresh machine

For Windows Server 2008 R2, first set up Web Deploy:
  1. Install IIS
  2. Download and install the Web Platform Installer (WPI)
  3. WPI: Install MVC4
  4. WPI: Install Management Service
  5. In the Services app, set the Web Management Service to start automatically but don't start it yet
  6. (Re)start the IIS Manager
  7. Select the server node and in the bottom part of the main pane will be an icon "Management Service".  Double-click that
  8. Enable remote connections (setting up security as appropriate)
  9. Install Web Deploy 3.5 using the download, not the WebPI (if you did this earlier, you may have to change it in "Add/Remove Programs" to ensure that all features are enabled and restart IIS
  10. Create new website with an appropriate App Pool (.NET 4)
  11. In Visual Studio on the remote machine, publish the app using Web Deploy and validate the connection
  12. Accept the security certificate
  13. Re-register ASP.NET with c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
  14. Create a new MVC4 app in Visual Studio with Razor
  15. Publish!
Lovely - you should now be able to run you app.  However... You will want these NuGet packages, which you can install from the Package Manager Console:

No comments:

Post a Comment