Web Deploy - Configuring root deploy as the default
Asked Answered
C

1

7

I'm setting up a Web Deploy package from VS 2010 that will be heading to the client as a .zip and run using the GUI (not the generated batch file).

The issue I'm having is that I haven't yet figured out how to have the website deploy as a 'root' website by default, as all package efforts so far include a virtual directory default.

In IIS7/7.5:

  • I'm fine with warning about it committing to the root website (as discussed in this question). This does still require the manual step of the server admin removing the text.
    • (Though I wouldn't mind disabling the warning...)
  • The output generated from VS 2010 isn't suitable for the 'Import Server or Site Package' option from the server root, citing that it can't as it contains applications
    • In the target environment, it's best I'm not in the business of pre-populating values of the App Pool service accounts, etc.

In Visual Studio 2010, the 'IIS Web site/application' field in Package/Publish Web settings:

  • It won't allow a blank entry, and will default to Default Web Site/(Project)_deploy
  • Setting it to WebsiteName/ doesn't pan out at the other end

I have noticed that in the (ProjectName).SetParameters.xml file outsite the deployment .zip file, if contains the correct setting (Which works when run from the command line)

<setParameter name="IIS Web Application Name" value="WebsiteName/" />

Any suggestions as to how to get it to default to the root website when installing within the IIS GUI?

Champlain answered 4/7, 2012 at 6:55 Comment(1)
What I do is put in the "IIS Web site/application" field in PP/Web a note to whoever installs the package, like "[clear this field]". See sedodream.com/2011/11/08/…Rigsdaler
C
7

I know its an old question, but I found it while strugling with the same problem myself, and want to share my solution if it can help anyone else.

The following has been tested using Visual Studio 2013 and Web Deploy 3.5 installed on Windows 7.

To make the "Application Path" be blank when using the Deploy|Import application... on IIS, set the DeployIisAppPath to a slash instead of blank. The parameter can be added to your .pubxml file in "PublishProfiles" used for deploying.

<DeployIisAppPath>/</DeployIisAppPath>

This will make the default value of the field blank while importing package (see screenshot): Screenshot of import application package

I have not managed to get rid of that annoying warning message.

Contestation answered 16/6, 2014 at 18:37 Comment(1)
This was exactly what I was looking for. It's a shame there's so little info / documentation on this - took forever for me to find this post. I put the <DeployIisAppPath> setting directly into my .csproj file, instead of in a .pubxml file, and it works like a charm.Deste

© 2022 - 2024 — McMap. All rights reserved.