Monday, 15 November 2010

Using an Apache Server to Host “ClickOnce” .net Deployment

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.

No comments:

Post a Comment