Between a Rocky and a hard place.
March 15, 2007 Leave a comment
So I was blogging a couple of days back about the ClickOnce COM+ proxy issue we were having and in conclusion I wanted to add that we finally decided that the best approach in that particular situation was to work out a security profile for the workstation users that would allow them to install both the app and its proxy and overwrite a current installation of the proxy if necessary.
However, this doesn’t really solve the problem that if the proxy is already installed it will not reinstall and therefore if the proxy is a prerequisite the whole installation fails when the proxy install bombs out. I think I suffered from a bit bit of “solution fix” on this issue. It seemed that the prerequisite solution was the right one but it isn’t. I guess I just wanted to take as big a bite out of ClickOnce as I could and make use of its features.
In the end it was easier to distribute the proxy installer with the application and have the application check for its own proxy on startup and install it if it’s not present. This was achieved with a combination of “in code” ClickOnce using the System.Deployment and System.Deployment.Application namespaces and a managed wrapper round COMAdmin.dll to allow the installation and configuration of the proxy components. This is actually very neat and makes the ClickOnce install a little quicker and a little slicker, i.e. more like ClickOnce than Click-Five-Or-Six-Times.
I will do a full example post sometime soon demonstrating the technique.