Can we create a new website using MS WebDeploy

I read a lot of posts, documentation pages, etc. regarding WebDeploy through VS2012 and through the command line.

In all deployment scenarios, I noticed that the target site must already exist on the destination machine (IIS).

Is it possible to create a package that creates a site if it does not exist on the destination machine (hosting)?

+7
source share
1 answer

The appHostConfig provider will create the site on the remote server. It contains a million caveats when setting up remote bindings and the physical path, so check it first in your local environment. You also need to be an administrator (obviously).

Since you are using VS2012 to do the publishing (unlike msdeploy directly). You should be able to automatically create a website by following these steps:

  • Launch Visual Studio 2012 as an Administrator
  • Make sure "Use local IIS server" is set in the project properties
  • Make sure "Project Url" is correct (and if the virtual directory does not end with / )
  • Declare <IncludeIisSettings>true</IncludeIisSettings> inside <PropertyGroup> in your published profile

Then it should include appHostConfig in the deployment.

If you also want to create an application pool, you need to include AppPoolExtension in your publishing profile:

 <PropertyGroup> <PublishEnableLinks>AppPoolExtension</PublishEnableLinks> </PropertyGroup> 
+4
source

All Articles