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>
Richard Szalay
source share