Normally, to deploy ClickOnce applications, you would upload files to a Windows Server hosting environment. However, with the addition of a simple .htaccess file, you can host ClickOnce on an Apache based server.

Simply create a text document with the following content:

ErrorDocument 401 “Unauthorized”
DirectoryIndex index.php index.shtml index.html publish.htm publish.html
AddType application/x-ms-application application
AddType application/x-ms-manifest manifest
AddType application/octet-stream deploy

Save the file as .htaccess and upload to your deployment directoy.

The line:

DirectoryIndex index.php index.shtml index.html publish.htm publish.html

Allows the server to show the standard Visual Studio “publish.htm” file as default.

By |2010-11-15T09:56:00+00:00November 15th, 2010|VB.net, Web|0 Comments

About the Author:

Leave A Comment