Publish from Visual Studio to IIS Server – Tips

Lots can go wrong with this simple task. Basically, you want to create a publishing profile within Visual Studio – but unless you are setup correctly on the IIS Server, you will not be able to create this profile. The three steps that you need to address include:

  1. Step 1 – Install and Enable supporting services 
  2. Step 2 – Configure Web Deploy Publishing (on IIS). This creates a deployment file that you can use to help configure Visual Studio’s publish.
  3. Step 3 – Import the deployment file configuration into Visual Studio – and you should be all set.

 

Step 1 – Install and Enable supporting services and components 

a) The Web Management Service needs to be installed and running (see screenshot below).

 

              b) Web Deploy needs to be installed (The best way to obtain this might be via Microsoft’s Web Platform Installer – see screenshot below).

Step 2 – Configure Web Deploy Publishing (on IIS). This creates a deployment file that you can use to help configure Visual Studio’s publish.

Right click the website node–>Deploy–>Configure Web Deploy Publishing. This should prompt you for users (either domain or local users) that can ‘web-deploy’. See screenshot below. Once this step is successfully done, you are done with your SERVER  – and ready to move to Visual Studio. You will need to either export the file (deployment file that is created on IIS server) or just note the deployment values that will be needed. The deployment URL is key – and will trip you up if you try an incorrect combination. 

web deploy for publishing from Visual Studio

You will need these ‘deployment settings’ from IIS to import into Visual Studio – as you create a Publishing Profile (right click your web app only (NOT Your top level solution) –>Publish)

publish profile visual studio - settings from IIS deployment file

Summary

These are some of the steps that tripped me up while trying to get publishing to work directly from Visual Studio to my IIS Server. Don’t feel too bad if you wasted an afternoon or two trying to get this to work…

Cloud Advisory Services | Security Advisory Services | Data Science Advisory and Research

Specializing in high volume web and cloud application architecture, Anuj Varma’s customer base includes Fortune 100 companies (dell.com, British Petroleum, Schlumberger).

All content on this site is original and owned by AdverSite Web Holdings, Inc. – the parent company of anujvarma.com. No part of it may be reproduced without EXPLICIT consent from the owner of the content.

Anuj Varma – who has written posts on Anuj Varma, Technology Architect.


Leave a Reply

Your email address will not be published. Required fields are marked *