Infosys Microsoft Alliance and Solutions blog

« Silverlight and Matrix Transformation | Main | Financial implications of the Cloud »

Remote deployment of Clickonce application on IIS 7

Recently I was working on a WPF application that was being used by our entire team and I used to keep releasing new builds frequently and it became an issue as I had to inform everyone of the new bits and then they would all install it again. So we decided to go ahead with clickonce type deployment for the application and for this purpose used the wizard that is accessible from the project properties in VS 2008.

It was pretty trivial exercise to create a virtual directory on IIS and then publish the application and all was well. Then we hit an issue that since I was working of a laptop, when I was not in office, others could not install the updates. No rocket science in this that we then moved the installer (the published version) to a server and shared the new URL.

Everything was working fine till earlier today when a new person was trying to install the application and she got an error, which said that the particular .application (the manifest) file could not be accessed. What was surprising was the path that was shown in the error was actually pointing to my laptop and not to the server machine. It was only then I realized that when I publish a clickonce application, the URL is embedded inside the manifest file and when I just copied the files to server, it wasn't actually running from the server, but still was running off my laptop.

I opened the .application file in VS and saw that the codebase attribute of deploymentProvider element was pointing to the earlier published URL (laptop's IIS). I modified this and saved the file again, but now accessing the application actually resulted in corrupt manifest error. I haven't checked the details, but most likely when the .application file is built some checksum/hash value is also embedded inside the file. There is a hash element in the file which seems to indicate this. Since I directly modified the file, the file data and hash value were no longer in synch and hence the corrupt manifest error.

So I went back to the project in VS 2008 and tried publishing from it directly to the remote location. For this purpose, I set the URL to point to the remote machine's virtual directory that I had created for this purpose. Note that the remote machine was a Vista box and hence it was on IIS 7 that I was publishing the application. I got an error that essentially stated that the remote web site didn't had FrontPage Server Extensions (FPSE) and hence publishing failed. In IIS 7 I could not see any option to install FPSE also and somehow it didn't make sense.

A bit of search online and I got some hints from this site and accordingly I picked deployment to physical file folder and gave the URL in the "Installation Folder URL" field as seen in the figure below.


With this the publishing happened without any more errors and the person was also able to intall the application without any issues.


Thank you.
I tried to publish my application from vista development environment to Win2008 Server via http://Win2008Server/xyz.
I tried your solution and it worked.

Zimny, glad this helped.

Super. That solved my problem. Thanks very much.

I tried to publish my application,But Each Time find a error .

error missing required files

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter