I have a .NET web application that users will be running on their own servers. The installer I am writing will provide the user with a default installation directory.

My question is what is the optimal default directory for installing a third party web application in IIS?

My feeling is that there are two good choices:

<IIS Doc Root>\<product>


\Program Files\<Publisher>\<product>

Using <"IIS Doc Root">\ looks to be the easiest for workgroup or departmental style installation but does not seem to be a "professional" as the \Program Files option.

This is for a product that is targeted at medium sized business and/or departments/divisions of large companies.

In the end the files can be installed anywhere the user wants but I want the default installation experience to be as smooth as possible.


In my own humble opinion, you should go for option 3: programatically determine the doc root of the default web site on the server. Your installer should also be able to let the user choose which web site to install the app to in the case that they have multiple sites on the server.

I don't like web apps to install to Program Files and then have virtual directories created from that. And \inetpub\wwwroot\ is frequently abandoned in favor of a custom location as soon as a server is first installed and configured.

EDIT (based on your comment):

Then I'd go for option 1. If an admin has moved the doc root then they want it somewhere else for a reason. It's not infrequent that an IT operations group and an applications group are separate. Many times the operations group doesn't want anything other than the OS touching the system volume which is usually where the Program Files folder lives. Give the app group the option to set it up without having to get the operations group involved.

And again, keep in mind that "IIS doc root" is not necessarily a singular entity. If a server has multiple sites there will be multiple doc roots.

  • Sorry about that. I clarified that I actually am detecting and using the IIS doc root as the default installation folder for option 1. – Joe Kuemerle Aug 26 '10 at 15:35
  • @Joe no problem! see my edit. – squillman Aug 26 '10 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.