I have a application deployed through clickonce, but How can I modify the config file on the deployment server?. I mean, once the product is tested, it should be deployed in our production server, but need to modify some of the config parameters to consume production resources?. I heard we should use MageUI.exe, but still not sure.

I appreciate for your help.


+2  A: 

Yes, the best way to do it would probably be MageUI. Just open your manifests with MageUI, click Save and it should prompt you to resign the manifests.

You have two options when signing manifests. You can use a self-certificate or purchase a certificate. Self certificates are easy to use but when the app is installed the publisher will appear as Unknown. If you purchase a certificate, use these instructions to create the files needed to sign ClickOnce manifests - http://www.softinsight.com/bnoyes/CommentView.aspx?guid=78d107d1-3937-4d8d-81d9-73cb6ae18eee.

Watch out for versioning issues. We manage our smartclient downloads by version - if the server version is not greater than the clients, it isn't downloaded so re-signing with MageUI won't bring down the changes - you'd need to arbitrarily change the manifest version too.
+1  A: 

Whatknott is correct - we do this all the time for our config changes. The thing to remember is that if you are managing versions such that a user will only get the new version of the smartclient when there's a new version on the server, you'll need to arbitrarily increase the version in the manifest file to get the config changes to download to the user again.

This, of course, can be dangerous depending on how your deployment process versions the app. For us, we use a time-based algorithm, re-setting the version to be the date followed by HHMM (for example, 2008.9.23.1317). This is done in our build/deployment scripts so we can pretty much ensure that we can change the version to 2008.9.23.1318 in the manifest without worrying about another build using that same version.

Anyway, something to think about.