Here’s a more coherent chain of events for setting up WebDeploy:
-
Set up IIS (in Windows 8 this is done thru the “Add roles and features” in the Dashboard part of Server Manager. Very nice!) Also make sure ALL the features for .NET Framework 4.5 are set up.
- While you’re there, use Search to find inetmgr and add it to your Start/taskbar.
-
Open up IIS and R-click once you expand Sites\Default Web Site to the wwwroot folder (typically c:\inetpub\wwwroot).
- Create a folder named after your website.
- Back in IIS, R-click on the folder name under Default Web Site and select Convert to Application.
-
Note – it’s at this point that I hit an issue with the overly strict security settings in IE on the Windows Server 2012 QA/PROD boxes. So, to get around this, we abandon crappy IE and cut over to Google!
- Open up IE tools menu and add https://dl.google.com and www.google.com to the list of Trusted Sites.
- Go to Google.com and download Chrome. Ah, THAT’S better! So long IE!!!!
- Download the Web Platform Installer (this should be a part of IIS; it usually will prompt you to run it if you open up inetmgr from scratch).
-
In the Web Platform Installer I made sure – in the Frameworks tab – that the ASP.NET MVC 4 was set up (along with .NET Framework 4.5):
-
I also made sure that the IIS Recommended Configuration and the Web Deploy 3.5 options were set up:
- If you’re prompted above for Web Deploy 3.5, the Typical configuration is fine.
- Time to doublecheck. Open up Control Panel, Administrative Tools – and make sure that Web Deployment Agent Service is running.
- If you open up your new {websitename} folder under wwwroot, you’ll also see that IIS_IUSRS for the local machine has read/write privileges. Excellent!
- Now back into Visual Studio, and select Publish. Give your profile a name…
\
The Databases section is interesting – here’s where you can replace on publish your connection strings with the correct database entry for QA /PROD, and test connection strings.
Caveats:
- Note that if you’ve set up IIS before installing ASP.NET Framework 4.5, you MAY need to run aspnet_regiis to register the framework with IIS. (I didn’t have to do that). If you come across this issue, check some of the notes here.
- You also want to make sure in the Settings section that you select the checkmark to Delete Additional Files upon Publish. In old-school x-copy deployment terms, this means the same thing as deleting the destination (target) folder before you copy over files.
Found some good notes here on setting up IIS on a completely blank IIS server: http://www.iis.net/learn/get-started/whats-new-in-iis-8/installing-iis-8-on-windows-server-2012. It really is (relatively) painless compared to what it used to be; typically your issues will be insufficient permissions on the local machine/network to handle remote connections.