Deploying ClickOnce-application based on .NET 3.5 SP1 to IIS 6

 
12/17/2009
.NET, IIS
0 Comments

Today I had to create a ClickOnce installation for a VSTO Word 2003 Addin. Until I finally managed to deploy it to an IIS 6 webserver, some problems had to be solved. First you have to configure your application in Visual Studio, afterwards you have to register some mime types in IIS.

Configuration in Visual Studio

Navigate to the "Publish"-tab within your project. In the "Prerequisites"-dialog you'll see the dependencies of your project:

Prerequisites

You can choose between:

  • Download prerequisites form the component vendor's web site
  • Download prerequisites form the same location as my application

If you choose the first option the following can happen:
If a user does not have a dependency installed the setups will download it automatically. But if the vendor of the dependency has released a new version of the component in the meantime the setup will fail, since it expects the old version (Details).
This means you have to rebuild your setup if a vendor updates his component.

So choosing the second option may be the better option for a reliable setup experience. The disadvantage is that your setup size increases dramatically.
If your setup should include the .NET Framework 3.5 SP1 another pitfall exists. When you try to publish your application, Visual Studio will fail to resolve some dependencies. Get yourself some coffee and read topic 2.3.1 of Visual Studio Readme. Some downloads later your setup will work.

MIME types in IIS 6

Open IIS Management and apply the following mime types to the folder containing your setup:

  • .application: application/x-ms-application
  • .manifest: application/x-ms-manifest
  • .deploy: application/octet-stream
  • .vsto: application/x-ms-vsto (only required if you host an VSTO Addin)

Feedly Feedly Tweet


Related posts


Comments