Remote deployment of Clickonce application on IIS 7
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.