Atlanta .NET Regular Guys

Community Blog for two guys in Atlanta that focus on Microsoft and Community.

Quick About

This is the community blog for Brendon Schwartz and Matt Ranlett.  If you want to see their technical posts visit http://www.sharepointguys.com

Back To DevCow

Recent Posts

Tags

Email Notifications

    Archives

    ClickOnce certificates expire and wreaks havoc

    The client location I'm at now uses a ClickOnce deployed Windows application to perform some highly critical business functions.  Some time in the last two or three weeks, the application's certificate expired.  We tried to deploy an update and everything BLEW UP!

    Apparently, when you sign code from Visual Studio, you generate a certificate which is only good for a single year.  When the certificate expires, you can't update your app anymore.  The method to fix this is to publish the app with a new certificate to the web server.  Then, on the individual desktop machines you have to manually uninstall the application then reinstall from the ClickOnce website.

    What the hell?  You have to touch EVERY machine?  That SUCKS!  I have 100 users and they're all over the country!  Not a single one of them knows what I mean when I say "uninstall".

    There is a published Microsoft KB article which describes a pair of workarounds to the issue.  The first workaround is the uninstall/reinstall mechanism that I described above.  The second method is to create a C++ application which will create a new certificate with an extended expiration date.  In the KB article, Microsoft provides some SAMPLE code which should fix the problem.  Per this forums thread, if you call Microsoft Support, they will give you a tool which will fix the issue.

    They better fix this in the future - why would I care if my internally deployed application has been signed?  If it HAS to be signed, why is the certificate good only for such a short period of time?  I should be able to sign it once and move on.

    If anyone points at security concerns, I'll deliberately ignore them.  This is an internal app, not exposed to the web and not public.   I know I'm supposed to use the STRIDE model and do the safe thing, but when the client wants results the only security I worry about is job security!

    EDIT

    This guy has allegedly posted working source code delivered by Microsoft Support.  Someone needs to turn this into a working tool.

    Comments

    Dave said:

    Yes this is particularly annoying as a real world programmer.

    The Microsoft people appear to have not thought this one through past their development laptops and left us all to deal with it.

    Btw - Most people I know still develop tradtional applications rather than this 'publish & run over the web stuff' which seems the default.

    # July 30, 2008 4:16 AM