About Me

I have over 25 years of experience developing complex, business-critical applications for Fortune 100 companies such as Chevron and AT&T.

I am a Microsoft MVP in Windows Azure. I also have expertise in ClickOnce deployment, and am a moderator in Microsoft’s MSDN ClickOnce and Setup & Deployment forum. I co-run the San Francisco Azure Meetup and the East Bay .NET Meetup, and frequently speak at Northern California Microsoft .NET User Group meetings, as well as Desert Code Camp in Phoeniz, AZ, SoCal Code Camp in San Diego, and the Silicon Valley Code Camp.

As VP of Technology at GoldMail, I migrated their entire infrastructure to Windows Azure in less than 60 days, cutting their infrastructure cost by 90%. Nowadays I do Windows Azure consulting both independently and with Solliance.

Follow me on twitter: @robindotnet

If you would like to get in touch with me, leave a comment here. All comments are moderated and included in the daily flood of e-mails into my inbox for approval, so don’t be discouraged if it takes me a couple of days to respond and/or approve your comments.

161 Responses to “About Me”

  1. ae Says:

    Hi all, great blog !!!

    I have many problems with Click ONce and Application Files. I post several messages in MSDN.

    You are my hope. Thanks in advance. Greetings.

    • robindotnet Says:

      I have posted answers to many of the questions there. If I missed yours, please post back with the username you use on the Forums or a URL to the specific thread and I’ll see if I can help you.

  2. Piyush Varma Says:

    Hi Robin,

    I have a strange problem. I have created a Setup project and successfully created Setup1.msi (Windows Installer Package) and setup.exe files from within VS 2005 for Windows Forms project using a Setup and Deployment project.

    The Setup.msi works well on a Windows Server, but does not create program files on a fodler on a drive of an Amazon Cloud instance; however the setup goes thru song and dance and claims that installation was successful but there are no files in the installation folder! I did check that I have rights to create files in the installation folder by creating a new .txt file. Event Viewer shows that the installation was successful.

    How do I debug this installation please? Is there a way to create an installation log file to log the steps the Windows Installer succeeded or failed please?

    Thank you very much!
    Piyush Varma

    • robindotnet Says:

      Hi Piyush,

      Unfortunately, my expertise is in ClickOnce deployment, not Setup & Deployment packages. I recommend that you post your question to the MSDN ClickOnce and Setup & Deployment Forum. I answer ClickOnce questions there, and the Setup & Deployment expert (Phil Wilson) answers the S&D questions. Microsoft people also hang out there and help. You should definitely be able to get an answer to your question there.

      RobinDotNet

  3. Cris Says:

    Hi,

    I was sending this email to thank everyone on the Microsoft forums that have helped me out with my programming in C#. I have developed a small app over the past few months to help with car suspension calculations, and aside from a bug in the windows not closing it is complete 🙂 I thought you may be interested in seeing what you helped me create, if so the site is http://www.suspensioncalculator.com.

    All the best & many thanks,

    Cris

  4. Pranav Ainavolu Says:

    Hi Robin,

    Just redirected to your blog from MSDN forums. Really a cool blog… The posts are impressive and informative. Liked your blog very much. Adding it to my blog roll too.

    Recently, I am gravitated to ClickOnce Deployment and trying to understand its beauty… 🙂

    Hope your blog helps me in learning this more.

    Thanks again for a wonderful blog!

    Regards,
    Pranav Ainavolu

    • robindotnet Says:

      Thanks very much. I’m glad it’s helpful to you, as well as my posts in the MSDN Forums (primarily the ClickOnce forum, although I occasionally wander into the VSTO forum).

  5. Brian Says:

    Hi,

    We have a ClickOnce application (available from start menu) which has been deployed to prod for a couple of years now. The application is deployed to 500+ users. Recently, we have been receiving the dreaded “+ Value does not fall within the expected range.” for a handful of these users (10-20 users) on each update. This is our third update using .Net 3.5 SP1. A uninstall/reinstall fixes the problem.

    I have seen your other posts on this issue and nothing is pointing me to the cause. I have opened up a support ticket with MS, but they have not been able to help either. They suggest a ClickOnce store corruption, but we are trying to determine why it gets corrupted? This is the only ClickOnce app deployed in the organization.

    Wondering if you can offer an other suggestions. It’s also frustrating that ClickOnce does not offer a silent install. Since you are a ClickOnce MVP, can you push to add this feature? It would be really helpful in an enterprise environment.

    Thanks,
    Brian

    • robindotnet Says:

      I understand your frustration with this. I did ask the product team specifically about the handful of “death messages”, and was told that more logging was added in .NET 4.0, and if you have that installed, you benefit from it regardless of the version you are targeting. (And yes, I realize that’s not very helpful.) I’ll go back specifically about this one issue and see if I can get a better answer about it.
      [Edit] I couldn’t get any helpful information about this. It’s basically a problem with the older ClickOnce engine and the caching, which gets confused. If you install .NET 4.0, it updates the ClickOnce engine whether the application targets .NET 4.0 or not. This should result in fewer caching problems.

  6. Bill Says:

    Hi Robin,

    You asked me to post in your blog as a consequence of a post I made in the MSDN ClickOnce forum regarding security.

    Regards,
    Bill

    • robindotnet Says:

      Thanks Bill. Just for everyone else’s info, Bill provided me with some requests about doing authentication before retrieving the deployment manifest and installing the ClickOnce application. I have passed the information on to the ClickOnce product team. They said at this time, they have no plans to add that kind of security. But if they get enough requests for it, my guess is they will consider it.

  7. Khondoker Abdullah Al Mahmud Says:

    i am from bangladesh. i would like to know how third party dll/ocx can deploy in clickonce application at client machine.

  8. Jeff Says:

    We are having a problem of the Publish from the project properties page fails now all of a sudden but we can publish from the build menu. The error is the simple “Cannot publish because a project failed to build.”, but it builds everytime we hit build project or solution.

    Is this a know issue?
    I can provide logs if needed.

  9. Nirmal Says:

    Hi Robin,

    While referring http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/70da63bf-9016-4fb3-8138-182915c850c4 forum discussion, I found, that problem is quite similar to my problem. If you can please help me to overcome this.

    Here’s the scenario:
    I’ve already signed manifest files. When I’m going to resign them using “SecurityUtilities.SignFile(certPath, certPassword, timestampingUri, applicationManifestPath)” method I can see the “publisherIdebtity” tag is not changing accordingly, but the signature was changed.
    Then I deleted the publisherIdentity tag from my deployment manifest file, and signed using above function. Then my application successfully got signed.
    I’m wondering what went wrong, you have any idea?

    Thank you very much!

    Regards,
    Nirmal

  10. Peter Kellner Says:

    Thanks for all the useful information you’ve posted in the forums as well as your blog.

  11. Josh Says:

    Hi Robin, I’d like to start by saying THANKS!!! Your posts have been SO helpful while I hone my programming skills. I was wondering if you could shed any light on this. When my clickonce app installs, it generates 2 folders in the bellows of Documents & Settings…. one of these files contains a license file that I have included as “Content” (Copy Always), unfortunately it installs in the wrong folder. It needs to be with the folder that contains the .EXE, and I’ve been trying everything under the sun to get it to install in the correct folder, without any luck. Any help would be greatly appreciated.

    Hope to hear from you soon!
    Josh

    • robindotnet Says:

      There are always a bunch of folders created. In fact, my next blog entry is about the ClickOnce cache. I’ve written it, but need to re-do the screen prints before I can post it. I’m going to assume you don’t have a VSTO app, but have WinForms or WPF. The two folders start with xxxx..tion and xxxx..exe, where xxxx is the first four characters of your assembly name — right?
      The xxxx..exe is resources that are used by the app. As far as I can tell, it’s cached here, it’s not used at runtime.
      The xxxx..tion folder is the actual application and has the exe and all resources and assemblies deployed with the app.
      Can you check in Application Files and see if the license file is in the list? Is it set to “include” or “include(required)” or something else? Is it in the top level of your project in Visual Studio or in a subfolder?
      Robin

  12. Joe Says:

    Hi Robin,

    I read your post on SO:

    “Don’t buy a thawte certificate if you ever think you are going to deploy any Office Add-Ins with ClickOnce. They have an intermediate publisher, and don’t chain back correctly with the ClickOnce software for VSTO add-ins. Just FYI. Fine for regular desktop apps. ”

    Is this still up-to-date NOT to buy a thawte certificate?

    Which certificate provider would you recommend instead of thawte ?

    Kind Regards,

    Joe

    • robindotnet Says:

      Yes, I stand by what I said about thawte certificates. Note that this IS a Microsoft bug, not a thawte bug. Specifically, it’s a bug in the certificate code for the Office Add-Ins. It’s not a problem with regular ClickOnce apps. My company uses Verisign, but there are other companies you can get certificates from. I think even godaddy sells them. We use Verisign because we are a public-facing company and would rather have it show a Verisign certificate (used for internet security all over the place) then one from godaddy. You know what I mean.

      If you work in a company with a corporate IT department, they can create a certificate that chains back to them as a trusted authority as well.

  13. Tim Shults Says:

    Hello Robin,

    I’m wondering if you could please, please help me out.

    You also have something on your site about deploying for differing versions and that’s helped out, but that requires going into the project via Visual Studio to make the changes. This helped me out tremendously and thank you very much for this little gem.
    https://robindotnet.wordpress.com/2009/04/22/clickonce-installing-multiple-versions-concurrently/

    But I’ve come upon an wrinkle…. I’m creating some build scripts for our ClickOnce deployments. I need the same code base to be configured and deployed for 4 different compile configurations and servers. I have them going to different locations. I’ve done as you’ve suggested and changed the AssemblyName in my build script and I have everything working correctly. The problem is that in the manifest that is created replaces all my referenced DLLS into the AssemblyName that I gave in my call.

    So instead of the manifest referencing “ActiveReports6” it references “My.New.MSBuild.Given.AssemblyName”. For everything. So now when I try to go to my application I get that can’t find a reference error to my “My.New.MSBuild.Given.AssemblyName”.

    I’ve looked around and the closest that I’ve come to figuring my problem out is here but still it’s not quite there:
    http://www.netframeworkdev.com/msbuild/use-msbuild-to-generate-multiple-installs-of-click-once-deploy-application-21773.shtml

    Thank you so much for posting all you have. This site has been a great help to me and my clients over the past two months.

    Tim Shults

    • robindotnet Says:

      Hi Tim,
      I’m glad this has been helpful to you. Most of the things I blog about are my own experience with ClickOnce.

      Unfortunately, I don’t use msbuild. We do our publishing through Visual Studio. For questions with msbuild, I would post to the MSDN MSBuild Forum.

      Robin

  14. Francis James Says:

    Hi Robin,

    I love your Blog. I’m still an apprentice in ClickOne publishing, and you’ve given me much help, both through the MSDN forums and through the information you share here in the Blog.

    If you think I have problems with ClickOnce, I hope to tell you about ODBC someday.

    Best wishes,
    Francis33

    • robindotnet Says:

      Hi Francis,
      Thanks, it’s nice to know that people are finding my blog useful. ClickOnce is kind of a niche technology, and I’ve learned a lot about it, and like to save other people some of the pain points I’ve had. Now if only I didn’t work so much, I could blog more…
      Robin

  15. Francis James Says:

    Hi Robin,

    Regarding this MSDN Forums Thread:
    ClickOnce Publishing, Warning MSB3155 and Warning MSB3162

    With your response of:
    Wednesday, September 08, 2010 4:01 PM

    And my response of:
    Wednesday, September 08, 2010 6:03 PM

    Is anyone actually looking at this?

    Regards,
    Francis

    • robindotnet Says:

      Hi. I did ping the SQLServer Express product lead and talk to the ClickOnce product lead to try to get you some help. The SSE lead sent an e-mail back last week, but I’m so bogged down in work I hadn’t had a chance to post it back. I’ve posted his response on MSDN, so please see if it helps you. He actually said you might have to rebrick the machine, but that seems a little drastic at this point. He has also looped in the setup people. Did you file a connect bug on this? If you file a connect bug and post the link to it in the forums (and here), I’ll also send that to them. Put as much information in it as possible.
      Robin

  16. Francis James Says:

    Hi Robin,

    I am sorry to impose upon you. If you provide me an email address (send to my email address), I will respond directly (and try not to impose upon you).

    I would like to “rebrick” my test machine. I assume that “rebrick” means to do a “factory image restore”.

    To overcome installation problems with SQL Server, I did rebrick my new 64-bit software development machine (Dell Studio XPS 8100), one week after setting it up (i.e., I did a “Dell factory image restore”). I would happily do the same thing for my old 32-bit machine, but I do not know how. I doubt that “factory image restore” is available for such an old machine, and, if it were, it would probably render the machine useless (i.e., unable to detect the peripheral devices, monitor or mouse or keyboard). If there is a way for me to set up the machine as if it were new with Windows XPS SP3, without risk of making it useless, I would be happy to do that. However, as I mentioned to Kira, it is unrealistic to expect that machines which receive applications through ClickOnce deployment will be “clean”. It is unlikely that many machines are as “dirty” as my 32-bit machine was when I first tested ClickOnce deployment on it, but it is not impossible.

    I did not file a “connect bug” on my current problem, but I will if you think it is advisable.

    Thank you very much for your continuing support.

    Regards,
    Francis

    • robindotnet Says:

      I don’t generally give out my e-mail address, and you have a better chance getting help in the Forums (I’m tracking your thread). I get a couple of hundred e-mails a day and I’m working 16-hr days right now trying to hit a deadline, so I’m not as responsive as usual.

      Please go ahead and file a Connect Bug on the problem and post the link in the forums. I’ll get the alert. I do have the SQL Server Express product lead trying to help as well, and did post back some information for you. It’s an odd problem and I haven’t seen it before.

      Thanks,
      Robin

  17. Dan Says:

    Hi Robin,

    I have had extreme difficulty finding follow-up information on an issue I’m having with ClickOnce deployment and, upon doing some web searches, stumbled upon your blog. The specific issue I’m having is with regards to file associations being made during ClickOnce install on Windows 7. I found the following link and posted a follow-up message, but the last follow-up to that error was back in January and I doubt I’ll ever hear back from anyone.

    https://connect.microsoft.com/VisualStudio/feedback/details/521282/clickonce-incomplete-file-association-in-windows-7-x64

    Do you personally have any knowledge of this error or any suggestions as to where I might go to find a work-around? Do you know if a new version of ClickOnce has been released that might address this issue? The workaround listed involves going to a 64-bit command prompt and issuing commands, but that will not work for the users to who I am attempting to deploy this application. Any help you can provide would be appreciated.

    Thank you,

    -Dan

    • robindotnet Says:

      Hi Dan,
      I didn’t know about this. What’s weird is I’m running a ClickOnce app on a 64-bit machine, and the file associations work fine. Are you using manual updates or automatic updates?

      I’ll send an e-mail to the C/O product lead and ask if he has any info on it. Did you vote it up? Be sure to click on the green triangle; the most votes they get, the more likely they will fix it.

      Robin

  18. Tim Shults Says:

    Hi Robin,

    I just wanted to follow up on my issue and then to ask some help on another issue that we’ve found.

    First, what I did for my last issue. I ended up using different Configuration Setups in my projects and setting the various flags and setting via Compiler Directives for those Configurations. I think used seperate *.build files that pointed to the specific Build Configuration as well as renaming the assembly there. Not as clean as I wanted but still rather nifty.

    Now for the next problem, we are very close to deployment. This is a Win32 application that is getting deployed on XP and Win7. On the XP boxes the application downloads and installs with no problems. When I try to download and install on Win7 using non-Admin credentials, I get the following error file….

    Begin File
    —————————————————————————————————————————–

    PLATFORM VERSION INFO
    Windows : 6.1.7600.0 (Win32NT)
    Common Language Runtime : 4.0.30319.1
    System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll : 4.0.30319.1 (RTMRel.030319-0100)
    dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll : 4.0.31106.0 (Main.031106-0000)

    SOURCES
    Deployment url : file://network/path/to/my.application

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\network\path\to\my.application resulted in exception. Following failure messages were detected:
    + Configuration system failed to initialize
    + An error occurred loading a configuration file: Access to the path ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config’ is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config)
    + Access to the path ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config’ is denied.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

    WARNINGS
    There were no warnings during this operation.

    OPERATION PROGRESS STATUS
    * [10/6/2010 12:44:12 PM] : Activation of \\network\path\to\my.application has started.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [10/6/2010 12:44:12 PM] System.Configuration.ConfigurationErrorsException
    – Configuration system failed to initialize
    – Source: System.Configuration
    – Stack trace:
    at System.Configuration.ConfigurationManager.GetSection(String sectionName)
    at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
    at System.Net.Configuration.WebRequestModulesSectionInternal.GetSection()
    at System.Net.WebRequest.get_PrefixList()
    at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
    at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
    at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
    at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
    at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
    at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    — Inner Exception —
    System.Configuration.ConfigurationErrorsException
    – An error occurred loading a configuration file: Access to the path ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config’ is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config)
    – Source: System.Configuration
    – Stack trace:
    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
    — Inner Exception —
    System.UnauthorizedAccessException
    – Access to the path ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config’ is denied.
    – Source: mscorlib
    – Stack trace:
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
    at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions)
    at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

    COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

    —————————————————————————————————————————–
    End File

    Any ideas? Has anyone seen this before? We’re at a loss right now.

    Thank you so much for your help.

    Tim Shults

    • robindotnet Says:

      It looks to me like you’re trying to modify the machine.config file, and you don’t have permissions. Or you have a machine.config file in a \config folder, and it is looking in the .NET folder because you haven’t specified the full path. I think the current folder is the .NET Framework folder when installing a ClickOnce app, which is why you’re seeing that folder in the error.

  19. Imran Says:

    Hey Robin

    I have created a win app and published it through clickonce and there are a couple of problems i have and am hoping you can guide me to a solution if available. the issues i have are:

    1. When I remove the app from Add/Remove it doesn’t shutdown the current running instance of the app – this causes a problem when trying to re-install the app. Is there a way to check and kill the app before uninstalling? I understand that if the re-installation is done after reboot then it would work – but how can this be achieved without having to reboot.

    2. I have an option in the app where the user can set the app to start on windows login. I set this by adding a key in the registry at Software\Microsoft\Windows\CurrentVersion\Run – I want to delete this key on uninstallation. Is this possible?

    thanks for your blog. its been a HUGE help!!

    • robindotnet Says:

      The answer to both questions is no. You have to shut down the application before it will fully uninstall it. What kind of app are you using ClickOnce for that the user can’t close it? (ClickOnce is only designed for smart client applications such as WinForms, WPF, and console apps). Also, there is no way to specify uninstall actions for a ClickOnce app. If you are deploying a VSTO application with it, there is a post-deployment action available, but not for regular smart client apps.

  20. Sambodh Says:

    Hi Robin,

    Yesterday I used your superbly helpful blog on “How to deploy SQLServer Compact Edition software locally” to deploy an application with an embedded local database from my website. So thanks for that.

    I am so impressed by the ease of deployment of ClickOnce that I am writing to ask you if the same thing is possible with Microsoft Access 2007. I am about to launch a package I’ve written over the past couple of years and would love to offer an installation which was ClickOnce, but there only seems to be the old .msi Package and Deployment option available in Access. If you know of any way to coerce an Access application into the ClickOnce deployment framework, maybe via VSTO, I would be eternally grateful. Otherwise I’m going to have to investigate the SageKey option…

    • robindotnet Says:

      What are you trying to deploy? Microsoft Access 2007? Even an Access application requires that Access already be deployed on the machine, and the only way to do that is to install it from Microsoft, right? When you say you have an Access application, I think of one that is written in VBA and runs in Access — is that what you mean? If so, there’s no way to deploy that with ClickOnce. You can use ClickOnce for VSTO apps, but it has to be written in VSTO, not VBA.

  21. Kuro Says:

    Good day Robin, i have read some of the posts that you have made on the MS pages, and you are very well versed in the ways of one click applications(O.C.A.). So I would like to inquire something if I may. We were provided with an O.C.A. on one of the images (ghost casting) the OneClikck cannot run, it seems a local GPO is enforced for all Authenticated Users, unfortunately the person that updated this image is no longer working with us, this is the first time I interact with a O.C.A. do you have any insights of where would I have to go? Thanks for taking the time of reading this!

    • robindotnet Says:

      I am going to assume you are referring to ClickOnce applications. I think Microsoft uses One-Click to define the deployment method for web applications now.
      I am not sure I understand what the problem is. Do you have the code for the application? Is it deployed to a webserver or to a file share? What does GPO stand for?

    • robindotnet Says:

      Hi,
      I’m still not certain I understand what you’re asking. If you have an application deployed via ClickOnce to a server, and want to know how to update it, you have to have the code, and publish a new version from either Visual Studio or msbuild&mage. Is that what you’re trying to figure out? What “image” was being updated? Is it a web site, or a deployment for an applicatoin?
      Robin

  22. Richard Says:

    Hi Robin,

    I found your published article ClickOnce deployment and Certificate Expiration very useful and helpful. However, there were a few things that I had to figure out or change myself, and I thought that maybe it would be helpful to others trying to uninstall/reinstall their applications, if you could change a few things in the article.

    1. You must set the minimum version of the old app to the current published version, which denies the user the choice of getting the update. This is important because otherwise when the app tries to uninstall itself, the “Restore to a previous version” option is available in the uninstall dialog box, and in fact it is the default option. Consequently, when the DeploymentUtils clicks the Ok button, it will just restore the app to a previous version, and not uninstall itself.
    2. In the method “GetUninstallString” in the class DeploymentUtils, I think you must change this line

    if (uninstallString.Contains(PublicKeyToken) && DisplayName == "TestCertExp_VB")

    to something like this

    if (uninstallString.Contains(PublicKeyToken) && DisplayName == "MYAPPLICATIONNAME")

    replacing MYAPPLICATIONNAME with the applications name to be uninstalled. I actually used something more like this

    I also added a messagebox to the UninstallMe() method to tell me if the uninstallString was not found. Just helful for my debugging tests to get this working.

    Lastly, it might be useful to reference this blog entry

    which has an alternative way to do this same kind of thing.

    Thanks again. Your article really saved me and my client a lot of work.

    • robindotnet Says:

      Hi,
      1. About the minimum version — that is stated in the article. I’m assuming you are talking about the article on MSDN.
      2. Yes, you do have to change the value of DisplayName that it is looking for. I thought most peoiple would be able to figure out that the display name was the same as the application name.
      When developing the code, I added a LOT of display statements to make sure it worked. I’ve used this code repeatedly, and have a VSTO version of it as well that I haven’t posted yet.
      I’m glad the post was helpful to you!
      Robin

  23. Robert Says:

    Hi Robin,

    I am hoping you can help with an issue I am having with a Clickonce deployment. I can go to the default site and click on run which will download and install the pre-req’s and then the application should startup. The problem is that the application is not launching. You can go into Task Manager and see the exe running, but you cannot see the application. It’s like it is running in the background. Any ideas on a setting or something in the deployment configuration that would cause something like this? We are building the application and deploying from Windows 7 laptops to Windows 2008 R2 Servers. The application is a WPF app. Any help would be greatly appreciated.

    Thank you,

    Robert

    • robindotnet Says:

      Hi Robert,
      Your application is most likely crashing for some reason. (I’ve had this problem before!) If you go to the ClickOnce cache and drill down to where the executable is and double-click on it, does it work? Doing this runs it without the “clickonce-ness”. The cache (Vista/Win7) is in C:\users\username\AppData\Local\Apps\2.0\obfuscatedfoldername\obfuscatedfoldername\. For a desktop application, the folder will probably start with something like xxxx..tion (it’s not the xxxx…exe folder — that holds resources files) where xxxx is the first four characters of your assembly name.

      You might consider adding exception handling to your application for the unhandled exception and see if that’s illuminating. When I had this problem, I ended up putting in tons of messageboxes to see exactly where it was crashing so I could fix it.

      Good luck,
      Robin

  24. Ferdi Says:

    Hi,
    here http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/70da63bf-9016-4fb3-8138-182915c850c4
    you describe how to re-sign the CO manifest files, you’re obviously using there the MSBuild tasks.

    I don’t use msbuild, because a) I never used it before and b) msdn says it’s not intended to use from code.

    On the site that I linked above you say you will share the whole project for better general overview how it is used in the code / deployment project. I guess, your code snippet there, it’s part of sth resulting in a msbuild dll?

    Would like to see it, THXS very much.
    Ferdi

    • robindotnet Says:

      Hi,
      It doesn’t use msbuild. It’s C# code for re-signing the manifests using the available methods in the .NET Framework, and is part of a bigger application that reads in the manifests and lets the user modify them, then re-signs both manifests at once, rather than the two steps usually required. IIRC, it’s called the Manifest Management Utility, and you should be able to find it on Codeplex.
      RobinDotNet

  25. Jerry Says:

    I’ve tried to follow your guidance on enabling samesite for my .NET 4.0 Client framework, with any success. Is there a chance you can update the .NET 3.5 guidance? Also, I need to be able to redistribute internationalized versions of the .NET 4.0 Client framework, but am not sure how to update my Bootstrapper folders so that VS2010 publish will find and use the right bootstrap files. Any help is greatly appreciated.

    Thanks.

    Jerry

    • robindotnet Says:

      Hi, Are you talking about these instructions for enabling SameSite for VS2008 SP-1? Those are the only instructions I know of, and they were provided by Microsoft. I can ask the ClickOnce team if they have any version of that somewhere that is updated. Can you please post your question in the MSDN ClickOnce Forum and I can respond there if I can get info from them, but also other Microsoft people can contribute if they happen to have an answer?
      Robin

  26. Ronad J. Dorovi Says:

    Tom H. is a high school bud and friend forever. Via his Linked in I saw your bio. I had to say hello. Upon quick perusal I did not catch if you were female or male. Not only Tom, but Chevron and ATT are also my background (and keys to my portfolio). As a BS PTE in ’82 , i was highly recruited, hired and then rose above the downturn. I see your timing had you continue education, and then went a successful IT route. Tom actually did my taxes back then. ATT was a family portfolio thing, I then went the southwestern bell path, and happily ended up back with T and the accompanying dividends. Short of being an aggie and trying to make a living in bay area, looks like you are doing ok and I smile when I noticed your twitter comment of you/tom meetings. As I told Tom, I stil don’t have a goldmail acct, I don’t carry a handheld device, and I scoff at twitter and facebook. However I admire what you all are doing. To each their own. I have a successful small biz on the beaches of Phuket with my Thai wife. I also still cosult to the oil industry and currently help offshore atlantic canada’s high end, high cost shows. Best wishesk with Gold Mail.

  27. Cameron Says:

    Hi Robin, I work on the SQL Azure community team at Microsoft and came across your recent post on migrating to SQL/Windows Azure. Great stuff! If you’d like to send me an email, i wanted to point out a couple of resources that your readers might find helpful. Thanks!

  28. Sebastian Grollmus Says:

    Hi Robin,

    we have a problem with starting our ClickOnce Application from a website, when the Internet Explorer security option on the client computer “Run components not signed with Authenticode” is set to “Disable”.
    Even if we set the Application to Low-trust in the app.manifest File, it does not work:

    The error we get is: “Your Web browser settings do not allow you to run unsigned applications.”
    Is there a workaround or another way to handle this?

    Thanks.
    Sebastian

    • robindotnet Says:

      Are you running your application as a full-trust app? If you turn on the option to run components not signed with authenticode, does it work? And more importantly, are you signing your application with a certificate from a trusted publisher like Verisign?

  29. Ole Henrik Oftedal Says:

    Thank you very much, Robin!. You must be a true genious! I got it to work also for my Norwegian .NET 3.5
    (Then you must replace the string ” Maintainance” with ” Vedlikehold”.)

    Also remember to specify on Application Updates Dialogue the same version number here as the Publish version number. Check Specify a minimum required version for this application and fill inn Major,Minor,Build and revision.

    This must be done because otherwise you will not uninstall the whole clickonce package. You will end up going back to a previous version beacuse this is the deafult choice in this window (when available).

    Ole

    • robindotnet Says:

      Thanks. I’m glad it was helpful to you. Also, it does say that the last update must be required. Otherwise the ClickOnce uninstall dialog will have a radio button selection with the wrong option selected.

  30. kschuler Says:

    Hello. You’ve been helping me with this issue on MSDN:
    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/3bb67f0a-5475-452c-8d83-869525d3bddf/

    The user hasn’t had the error again with the missing icons, but I’ve been keeping an eye on the user’s local settings\apps\2.0 folder and the ClickOnce log file with verbose set to on and I am unsure about a few things. We haven’t published any new versions of the program since May 5th when I turned on logging for the user, but the log file looks like it has four sets of log information for my application. Does this logging occur everytime an app even checks to see if a new version is available? Or just when it updates? Also, I noticed that in the user’s local settings\apps\2.0 folder there are two folders that are randomly named which seems wrong to me. I then went into the Data folder in that directory, and there is only one folder inside that one that is randomly named which seems right to me. Please send me your email if you’d like to look at the log and a screenshot of the folder structure that I’m unsure about.

    And again, we still haven’t reproduced the error. I just wasn’t sure if this already was a sign of some kind of problem.

    • robindotnet Says:

      Hi Katie,
      Every time a ClickOnce application runs and checks for updates, gets an update, is installed, or is uninstalled, it writes to the log file. Hence my comment about keeping an eye on it so it doesn’t get too big.
      Also, the C/O cache (\apps\2.0\ does have a weird-folder-name, and in that another weird-folder-name. Are you saying you have two of them in the \2.0\ folder? Do they both have files in them?

  31. Andrei Says:

    Hi Robin
    Sorry for my poor english

    I am bulding a solution that uses a web portal and an executable published with clickonce.

    After the user has created an account in the portal, I need to somehow “know” when installing what account is it for. I am thinking about renaming the setup programatically, and add an ID, like setup-1234.exe, via the portal on account creation and allowing the user to download it, but I cannot figure out how to “read” the setup filename on application instal.

    Any ideas?
    Thanks in advance

    • robindotnet Says:

      Hi, I’ve answered this in the forums where you posted the question. Cliick here to see the thread. Thanks for posting it there; that way if others have the same question or problem, they can benefit as well.
      Robin

  32. Sri Says:

    Hey Robin,

    This is post is in response to your reply to my question on msdn forum
    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/55a8b1e1-ec06-48cd-98b8-38c70a7e03c2

    I am still facing the problem with IE9 browser. It still opens ClickOnce deployment manifest in Notepad…My IE9 version is 9.0.0.8112.16421 with Update Versions: RTM (KB982861). Works fine in IE8.

    Thanks for any updates.

    • robindotnet Says:

      Are you still having a problem with this? If so, ping me back and I’ll see if I can get Microsoft involved. In every single case where this has happened, it has turned out to be a problem with the MIME types not being set up correctly on the server. So please double-check that.

  33. Alex Katsaros Says:

    Hello RobinDotNet we have installation issues in our application using ClickOnce and .Net 4. And we would appreciate your expert opinion. Please check out our post on MSDN.

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/73a7bf63-14d3-40be-8280-9f3c6ead0f77

    thanks a lot.

  34. Mark Says:

    Has there been any more development going on inside Microsoft with regards to the longstanding issues with clickonce app installation/deployment when proxy servers are involved? My best estimation is that nothing “new” has been posted since some partial workaround was presented by Bronumski in about 2 years ago already! Like others, the allure of using the clickonce deployment/auto-update capabilities gets seriously killed in many corporate environments with proxy servers.

    • robindotnet Says:

      No, I haven’t heard anything about this. I have been asked to submit a list of common ClickOnce requests, and I’ll make sure (again) that this is on the list. This is a major deal to fix, though, because of what ClickOnce has access to and what it doesn’t (the IE security settings, for example) and I don’t think they will fix it in ClickOnce. I feel your frustration, and totally understand. Don’t worry, I’ll let them know.

  35. Anthony Says:

    Hello Robin,
    During ClickOnce installation, a number of screens appear.
    One is the “Security Warning” dialog

    ——————————————————————————
    Application Install – Security Warning
    “Publisher cannot be verified.”
    “Are you sure you want to install this application?”
    Name:

    From (Hover over the string below to see the full domain):

    Publisher:

    ——————————————————————————-

    My reading says that this dialog comes from the
    “.Net Framework Language Pack” .
    If I wanted to remove the “From … domain):” string
    along with the associated “<application domain" string
    from this "Security Warning" dialog, how would I do that ?
    Would I need to use the "Bootstrap Manifest Generator" ?
    I am using VS C# 2010 as a development environment.

    Thanks.

    Anthony

    • robindotnet Says:

      In order to change the “Publisher cannot be verified” message, you have to sign your application with a certificate from a Certified Authority (such as Verisign). If you do this, it will show your company name instead. That security dialog is basically trying to give information about who the application came from. If you try to buy a certificate from, say, Verisign, Verisign will investigate you and make sure your company is real and valid before selling the certificate to you. They have a liability if you turn out to be bogus. So if the user clicks on your company name in that dialog, it will show the certificate and that it chains back to Verisign, and they know they can trust you.

      If you work for a corporation, usually the group that supports the servers and webservers, etc. can generate a valid certificate with them as the CA, and that will work as well.

  36. Andrei Vajea Says:

    I had the same problem, and I just needed to generate a test digital signature, and the problem disapered 🙂

  37. Anthony Says:

    Hello Robin,
    Thank you for your reply.
    My question had more to do with the specific
    strings used in the “Security Warning” dialog.
    It turns out that my software does possess
    a Certified Authority.

    ——————————————————————————
    Application Install – Security Warning
    “Do you want to install this application?”
    Name:

    From (Hover over the string below to see the full domain):

    Publisher:

    ——————————————————————————-

    But let’s say I wanted to change the strings in the
    above dialog to display a more personal response.
    For example, let’s say I wanted to change
    “Do you want to install this application?”
    to
    “Do you want to install application XYZ ?”
    or completely remove the
    “From (Hover over the string below to see the full domain):”
    string completely from the dialog.
    Are there resource files
    (presumably in the “.Net Framework Language Pack”)
    that I have access to such that I could change the strings
    in the above message. Or are the strings hard-wired in a
    “.dll” such that they cannot be changed?

    Thanks.

    Anthony

  38. Joel Says:

    Hello Robin,

    We’ve recently deployed a ClickOnce WPF application and changed the Platform Target to x86 from Any CPU and caused all users to uninstall / reinstall (exactly like this http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/bbc802a5-5acc-44c0-8c8c-56b9a08d899e ).

    Thats okay, the users have dealt with the inconvenience and moved on… EXCEPT we realized now that we deployed that version of the without ‘The application should check for updates’ checked! I am now wondering, are any other options other than forcing the users to uninstall and reinstall again?

    Can anything be done to manually modify an installed ClickOnce client and force it to check for update?

    Thanks,

    Joel

    • robindotnet Says:

      Dang! I feel your pain. Back when I first started with ClickOnce, I changed the target CPU of our app so it would run on 64-bit machines and republished it. Within about 3 minutes, I got calls from most of the people in the head office. Oops. I had to change it back and republish and write a plan to make that change. By the way, if you do that again, you can programmatically uninstall and reinstall the application; check out my certificate article on MSDN for that code.

      I don’t think you have to have the users uninstall and reinstall. What I would try is this — publish a new version with that flag set. Then send them a link to the deployment manifest and ask them to install the new version. This would be like http://yourserver.com/yourapp/yourappname.application. It will install the new version on top of the previous one with no problem just like it picked it up automatically, and then they should get the next update automatically. Might want to test it to verify, but I’m pretty sure that will work.

      Good luck!

      • Mike Says:

        Hi,

        I am working with Joel on this issue and wanted to further elaborate on it. I have discovered that I can use MageUI.exe to modify the deployment manifest to include the automatic update flag in the application that was already deployed. Doing so ensures that any new installs have the flag set correctly, however any users that already installed the application prior to the manifest change will still not have automatic updates set. Is there any way, after modifying the deployment manifest, to force that setting to ‘refresh’ on clients that were installed prior to the change?

        Mike

        • robindotnet Says:

          No, I’m afraid not. If you change the flag for the version currently deployed, people who already have that version deployed without the flag will never get it. ClickOnce only updates when the version number changes. Hence my recommendation that you publish a new version with the flag flipped. New users will get the right info, and users who already have it installed will need to reinstall it on top of the one they already have manually. You can’t publish a new version, and htne send them a link to the deployment manifest and ask them to click on it? That’s all it will take.

  39. Gerry Says:

    Hello Robin – I attended your Windows Azure Sessions in Desert Code Camp in Phoenix, AZ. Have a quick question and was wondering if you can point me out to the right direction. I am looking for prep material @ Windows Azure Certification 70-583. It would be great if you can provide me some information about books, online material which can help me preparing for this certification. Thank you and I do appreciate your response.

    Gerry

  40. Sudha Says:

    Hi Friend,

    Am also facing the issue in Windows service. My solution contain Windows service and Class library. The service is not calling the class library files and event log also not throwing any exceptions. When i debugged the solution everything was working fine. But when i run the service it is not calling the class libary files. I have added all necessary DLLs in Windows service bin folder.

    Please help me.

    Thanks.

    • robindotnet Says:

      I’m not sure what your question is. What issue are you facing with your windows service? If you’re having problems with your Windows Service calling your class library, do you have a reference in your service project to your class library?

  41. Robert Says:

    Hi Robin,
    I have followed your suggestions on several posts but they weren’t exactly related to my issue, so I figured I would write and explain my problem to see if you would be able to help me. I have a Click Once applicaiton that references a large number of xml files. These xml files are currently set as Content and “Do not copy” to output directory for each file property. In Application Files setting, I have them set as “Data File (Auto)” , Required. This all works fine, and when I add new files, they get picked up with new versions and everyone is happy. The problem comes when I try to remove files in a version. The application still seems to find the previous versions of the xml files that were removed in the current version. I’ve tried multiple things, such as specifying a minimum version number in the Updates section and choosing the latest version that doesn’t include the xml files, but they still show up. One of the more recent things I changed was based on some feedback you gave to a user for database files.

    I originally retrieved the location of my xml files like this:
    dataFilesPath = Application.UserAppDataPath + “\\ServerFiles”;

    but I changed it to this hoping it would only look at my current deployment files instead of any previous versions:
    dataFilesPath = ApplicationDeployment.CurrentDeployment.DataDirectory + “\\ServerFiles”;

    This did not help my situation. Any suggestions would be greatly appreciated. Let me know if you need more information.

    • robindotnet Says:

      If you let it store the XML files in the data directory, it will copy them forward with each deployment. I didn’t think it did this if the next deployment didn’t include the files, but it very well might.

      What I would try is this: Create a folder in your VS solution, and put the files there. On the properties of each file, set the build action to “content” and set “copy to output directory” to “copy always”. This will ensure the active ones are included in the deployment (in a folder with the same name).

      Then go into the application files dialog, and set them each to Include, and not to Data(Auto). When you deploy your application, it will include these data files with the deployment and not as data files, and you can access them from this folder:
      Path.Combine(System.Windows.Forms.StartupPath, folderName);

      When you publish the next version, it will NOT carry these forward, it will publish new ones. So this won’t work if the XML files are being updated by the user and you want the user’s changes carried forward. It WILL work if these are strictly resource files that you use in your app.

      –Robin

  42. RobinR Says:

    Hi Robin –

    I will be really interested in your opinion about using ClickOnce in a Desktop Virtualization environment. This talks about some issue (http://www.jeremyjarrell.org/archive/2009/07/27/126.aspx).

    Any thoughts will be helpful.

    Robin

    • robindotnet Says:

      I agree with everything they say in that article. You could try deploying it as online-only. In theory, it might remove the files when the user logs out — I’ve heard that — but I’m doubtful, so you definitely want to test it. It would still be a pain, because it would install it every time they run it. I just don’t think ClickOnce is meant for the virtualized environment; it certainly wasn’t Microsoft’s intention.

  43. pfla Says:

    I have a question on the “From (Hover over the string below to see the full domain):” as well. Once deployed my application displays the server name. However when I hover over the text I do not get the server’s FQDN. I presume this should be set by me when I create the deployment package which has to be done on the fly by my installer.

    • robindotnet Says:

      FQDN?

      • pfla Says:

        Fully Qualified Domain Name. In my app the tooltip shows the same value as the From: Both show just the server name.

        Example:
        ClickOnce App is launched by http://MyServer/MyApp.application

        If not previously installed a Messagebox appears

        “Do you want to install this app?”

        Name:
        “MyApp”
        From: (Hover over the string below to see the full domain)
        “MyServer”

        Since the messagebox is hardcoded with the additional string (Hover over the string below to see the full domain)
        I would expect the tooltip once I hover over “MyServer” to display “MyServer.MyDomain.com” instead it just displays “MyServer”.

  44. UVB Says:

    I have a question regarding ClickOnce.
    I have .NET framework 4.0 and Apache 2.2 as our Proxy server. From the proxy on the local machine, I am trying to launch the .aspx page at which time ClickOnce is generating the following error.

    PLATFORM VERSION INFO
    Windows : 6.1.7601.65536 (Win32NT)
    Common Language Runtime : 4.0.30319.269
    System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll : 4.0.30319.269 (RTMGDR.030319-2600)
    dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll : 4.0.31106.0 (Main.031106-0000)

    SOURCES
    Deployment url : http://localhost:8080/services/ucf-1243931048656/Emc.Documentum.Ucf.Client.Impl.application?ucf.home=C%3A%5CUsers%5Czv6776%5CDocumentum%5Cucf-net&ucf.app=shared&version=6.5.0.226&ucf.appHostName=3F796S1
    Server : Apache-Coyote/1.1
    X-Powered-By : Servlet 2.4; JBoss-4.2.0.GA_CP01 (build: SVNTag=JBPAPP_4_2_0_GA_CP01 date=200709131706)/Tomcat-5.5

    IDENTITIES
    Deployment Identity : Emc.Documentum.Ucf.Client.Impl.application, Version=6.5.0.0, Culture=neutral, PublicKeyToken=0acf8fbdaa69ecaa, processorArchitecture=x86

    APPLICATION SUMMARY
    * Online only application.
    * Trust url parameter is set.
    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://localhost:8080/services/ucf-1243931048656/Emc.Documentum.Ucf.Client.Impl.application?ucf.home=C%3A%5CUsers%5Czv6776%5CDocumentum%5Cucf-net&ucf.app=shared&version=6.5.0.226&ucf.appHostName=3F796S1 resulted in exception. Following failure messages were detected:
    + Activation failed.
    + Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

    WARNINGS
    There were no warnings during this operation.

    OPERATION PROGRESS STATUS
    * [6/5/2012 1:49:38 PM] : Activation of http://localhost:8080/services/ucf-1243931048656/Emc.Documentum.Ucf.Client.Impl.application?ucf.home=C%3A%5CUsers%5Czv6776%5CDocumentum%5Cucf-net&ucf.app=shared&version=6.5.0.226&ucf.appHostName=3F796S1 has started.
    * [6/5/2012 1:49:40 PM] : Processing of deployment manifest has successfully completed.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [6/5/2012 1:49:40 PM] System.Deployment.Application.DeploymentException (Activation)
    – Activation failed.
    – Source: System.Deployment
    – Stack trace:
    at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
    at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
    at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    — Inner Exception —
    System.UnauthorizedAccessException
    – Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    – Source: System.Deployment
    – Stack trace:
    at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
    at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)

    COMPONENT STORE TRANSACTION DETAILS
    * Transaction at [6/5/2012 1:49:40 PM]
    + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
    – Status: Set
    – HRESULT: 0x0
    + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
    – HRESULT: 0x0

    Based on some previous blog discussions, I have tried to delete the App\2.0 folder and still the error persists. Please advise what needs to be done to resolve this.

  45. Lindan Says:

    I posted a question over on stackoverflow:
    http://stackoverflow.com/questions/11017236/click-once-fails-with-strange-404-unknown-subtype
    It would be great if you could take a quick look. =o)
    Thanks in advance!

    • robindotnet Says:

      I’ve responded to the question. I’ve never seen “unknown subtype” before, I think it’s a problem with your manifest. The files *in* the manifest shouldn’t have “.deploy” on the end of the name, but the files themselves should. ClickOnce strips it off when it downloads the files.
      Good luck!
      Robin

  46. Roy Thompson Says:

    Hi Robin

    Do you know if MS ever got a fix for the IE9 and ClickOnce problem?

    I have an app that installs fine using IE8 but on IE9 I get a page of XML. Same app so not a MIME problem.

    Thanks in advance

    Roy Thompson
    roy@rothco.co.uk

    • robindotnet Says:

      Hi Roy,
      As far as I know, there is no problem with ClickOnce and IE9. IE8 and IE9 may be handling the MIME types differently. Can you check the MIME types on the server? In all of the cases I’ve seen reported of this pr oblem, that is what is causing the issue.
      RobinDotNet

  47. Roy Thompson Says:

    Hi Robin

    Thanks for that.

    The problem I was referring to was the one you reported at

    https://connect.microsoft.com/VisualStudio/feedback/details/661048/problems-with-ie9-and-clickonce-deployment

    First off I do not think it can be the MIME types as the same install works perfectly on my XP machine.

    Second – how do I check the MIME types?

    Many thanks

    Roy

  48. Carlo Merhi Says:

    Hello everyone,

    Is there a way to run the Setup.exe that created by the Publish Now/ClickOnce deployment without the application automatically starting right after? I want to deploy the setup.exe to several machines just so that the icon for the application is on the desktop and when they click the icon then it will be OK for it to check for update and launch but not right after setup has completed. Any ideas on that? I might have misunderstood the purpose of the ClickOnce setup…

    Thank you much,

    ~Carlo

    • robindotnet Says:

      Setup.exe is the bootstrapper. It just checks for (and installs, if necessary), the prerequisites, and then it calls the ClickOnce deployment. There’s no way to do that w/o calling the ClickOnce application, and the ClickOnce application has to be installed in order to create the shortcut. After that, when the user runs the application, it can check for updates before running (depending on your setting in the Updates dialog).

  49. P.Malathi Says:

    I want to develop and deploy web application in .net 2008 on windows azure. It includes excel import and export features also. Is it supported on windows azure. If possible can you illustrate the excel feature only. Thanks in advance. Waiting for response anxiously.
    With Regard,
    P.Malathi

    • robindotnet Says:

      To export, I recommend you write to a CSV file, which will generally be opened by Excel. For reading, you’ll have to either use the Open Document XML standard, or have whoever sends the data save it as CSV before you process it. You can not read and write to/from Excel from a web application, even one running in Azure — you would have to have Excel installed on the Azure instance. It is ill-advised to install an Office product on a server, let alone Azure, as this would be a serious security problem.

  50. Todd Hay Says:

    Hello-
    I’ve run into a ClickOnce problem, and despite many hours combing the web (and many of your postings), I am still unsuccessful in solving the problem. When attempting to install any ClickOnce application on my Windows 7 / 64-bit machine, I get a FileNotFoundException and the stack trace points to a GetUserStore method. I tried the various, recommended fixes (such as those found here: http://stackoverflow.com/questions/7779043/filenotfoundexception-during-clickonce-install-missing-hkcu-software-classes-so), but none of them work. I don’t find any Apps or 2.0 folders in my profile. My working hypothesis is that my profile has become corrupt and I need to rebuilt it. I just tried to clean .Net and then do a fresh .Net 4.5 install, but still no luck. Any advice you can provide is most appreciated.

    Thanks.
    Todd

  51. Todd Hay Says:

    Hi-
    I did try enabling the enhanced logging but unfortunately did not gain any more insight. It was definitely a problem with the profile. I documented the solution that worked here:

    http://nodexl.codeplex.com/discussions/399297

    Thanks.
    Todd

  52. Mark Says:

    Robin – what’s the RSS feed URL for your blog? I’d love to add it to my flipboard.

    Thanks!
    Mark

  53. PJ Says:

    Hi Robin,

    We have a ClickOnce application were are trying to deployfrom Citrix running Win2008. It works from users desktops (Winxp, Win7) but not through Citrix. In Citrix, nothing happens when you click on the deployment link from our Intranet homepage. We have tried various IE security settings but nothing works. This is a workaround we can use –> In Windows Explorer in Citrix, navigate to the network location of the .application file. Double click on the file. The deployment fails because it cannot find the manifest. After that, the link on the homepage now works in Citrix.

    The application is deployed to Tomcat.

    Thanks,
    PJ

    • robindotnet Says:

      Hi,
      First, make sure your MIME types are right on the Apache server. These are listed here.

      Second, does the Installation URL in your properties reflect the address of the deployment correctly? If you run fiddler on the machine you’re trying to install it on, it is actually hitting the deployment? To me “cannot find the manifest” is an indicator of the problem. Are you actually publishing directly to the server? If you’re putting the files out there yourself, are you retaining the right folder structure?

      I don’t have a lot of experience with Citrix, so I don’t know what you mean “deploy from Citrix”. Is the deployment sitting in one location, and people log into terminals to install and run the application?

      Robin

  54. PJ Says:

    Hi Robin,

    Thanks for your reponse.
    I reposted because some characters got dropped

    The ClickOnce deployment manifest, {myapplication}.application, is located in a Tomcat folder on a Win2008 machine.
    The application files are in that Tomcat folder. Tomcat is running on Win2008 not Apache
    There is link to {myapplication}.application on our Intranet homepage.

    From a user’s machine, this link works just fine.
    When we try it the same thing from Citrix, it does not work.
    The user logs onto Citrix and open IE and navigates to the link on our home page. Nothing happens. dfsvc.exe never starts.

    Citrix is running on Win2008 machines.

    We have a workaround. From Citrix, there is an icon that points to a batch file that has two lines

    1) CALL \\server\share\Tomcat7.0\webapps\ROOT\{myapplication folder}\{myapplication}.application
    2) “C:\Program Files\Internet Explorer\iexplore.exe” http://server:8080/{myapplication folder}/{myapplication}.application

    Line (1) actually fails – cannot find {myapplication}.exe.manifest. BUT, it starts dfsvc.exe.
    Then line (2) works. Line (2) is the same as the link on our homepage.

    I have seen issues with ClickOnce Deploy and Citrix
    http://support.microsoft.com/kb/2020945/es

    We tried some workaround in the workaound in the following article, but these did not help.
    https://connect.microsoft.com/VisualStudio/feedback/details/653362/net-clickonce-deployment-not-working-as-remoteapp-or-citrix-xenapp-on-server-2008-server-2008-r2 (see workaround tab)

    I was just wondering if you knew of any updates or workaround.

    Fiddler was good suggestion. Will try that

    Thanks,
    PJ

    • robindotnet Says:

      What I remember is this: Citrix is a terminal server environment. So the user logs on to a terminal, and Citrix creates a profile for them as if they are logged on locally to that box. At that point, they can install the ClickOnce application. They will have to install it every time unless they log into the same instance every time. Is that true for your environment, or do you have some kind of user folder mapping that they access when they log on?

      If the problem is that install link isn’t working, I’d check and make sure the link points to the setup.exe, or that the prerequisites are installed. Double-check the /apps/2.0 folder under the user’s profile on that machine and make sure there are no ClickOnce files there — is there any chance it’s installing but crashing when it tries to run?

      Also, what is the installation URL of your deployment? You need to have that command on Citrix hit that installation URL. If the URL is http://server:8080/{myapplication folder}/{myapplication}.application, then the first one definitely wouldn’t work, because it’s not being installed from the right place.

      I would check the .application file extension in the Citrix instance and make sure it’s set up correctly.

      If all of that yields no help, then turn on enhanced ClickOnce logging on the machine and try again, and check out the log. This article shows you how to do that.

  55. Freddie Frydkjaer Says:

    I just wanted to drop in and let you know that I think your blog is THE most useful collection of coding articles on the internet. Several of your brilliant articles have saved me a lot of hours!

    Thank you for taking time to write awesome articles, keep up the excellent work!!

    Best regards
    /Freddie

  56. Denis Says:

    Hi Robin,

    I have a Win Forms application that I am selling in a vertical market. I chose ClickOnce as the deployment method to keep it simple for my users (both for installing and for updating). However, I am having an intermittent problem that I need to address ASAP because it is costing me sales. Most users who install my program have no issue and the program installs and functions as expected. Every once in a while we come across a user who goes through the install process, but when the program (named FLASHPOINTS) starts up it immediately aborts with the message “FLASHPOINTS has stopped running”.

    The program is compiled as an X86 32 bit program because it is using an older dll and to allow it to run on XP, Vista, Win 7, and now Win 8.

    I have been racking my brain trying to figure out what is preventing the program from running on some machines, but not on others. Occassionally, I have come across the same behavior when certain anti-virus programs are in place, but in the cases mentioned the users have disabled their anti-virus programs. The latest user to experience a problem is running Win 7 Home Edition. I suspect that something is preventing a component in my program from installing, but I don’t know what it is.

    Is there anyway to solve this easily? I can send you the list of components in my build (I would prefer not to post them to a blog).

    Thank you,

    Denis

    • robindotnet Says:

      Hi Denis,

      This is not a ClickOnce problem. ClickOnce is simply the installation — if your app is called and tries to run, it’s past the ClickOnce control. If it crashes right away, ClickOnce will show the “…has stopped running” error. So yes, your application is crashing. If it does it consistently on a specific user’s machine, you can track down the folder where the executable is and double-click on it and run it from there and see what it does. If it works, then you probably have something that is needs elevated privileges to run for some reason. The best way to track down this problem is to put in a bunch of messageboxes or trace logging, AND put in an exception handler for unhandled application exceptions, and track down exactly where it’s crashing and why. We have had problems like this in the past, and usually have a customer who will work with us to track down the problem. (The first time it was caused by reading a registry entry that didn’t exist, and we didn’t have a try/catch block around it.)

      Also, for Windows 8, make sure you are signing the executable as noted in one of my recent blog entries.

      Good luck!

      Robin

      • Denis Says:

        Robin,

        Thanks for your response. I just got it today. As it happens I broke down and paid Microsoft to troubleshoot it for me. Well, it wasn’t a problem with my program, per se. The issue was with Microsoft SqlServer Compact Edition. I had it setup to install locally with my application but it was intermittently crashing on 64 bit machines because of a known (but rather poorly documented) issue with Microsoft SqlServer Compact Edition. Fortunately, after we identified the problem I was able to find a very helpful blog post that had detailed instructions for properly setting up Microsoft SqlServer in my project. Problem solved. I have installed the new build on five machines (XP, Vista, 2 Windows 7, and a Windows 8) and all performed as expected. My fix has now been released as an update to my customers.

        Best Regards,

        Denis

  57. David Harrison Says:

    Robin,

    I would like to take this opportunity to say a big “Thank You”. Your blog has proved a useful resource for me and stopped me from pulling out, what little hair I have left!

    I have had to create a process for our application support team to deploy our click once applications and whilst letting them use mageUI would be one option we prefered to be able to completely control the deployment. So I wrote an app to utilise mage.exe but there are still a lot of hurdles to jump. One question I have is why doesn’t mage.exe and mageUI.exe provide options for all the parameters that are available in the manifest and application files. Admittedly this would make them a bit unwieldly but would mean that I wouldn’t have to write code to update the xml directly. A specific example of this is the mapFileExtensions attribute in the deployment element of the application file. I have to use this as the apps are being deployed from an IIS server and to enable all the dll’s exe etc to be deployed from the server then all need the .deploy extension (thus needing the mapFileExtensions attribute).

    Thanks for all of your posts on ClickOnce deployment and keep up the good work.

    David

    • robindotnet Says:

      Hi David,
      I’m glad my blog entries have been helpful to you.
      You might want to check out the MMU utility on CodePlex. You can download the code and look at it — it has actual C# code to do the deployment manifests, and you might be able to take the code and adapt it to your own usage.
      It has long been a frustration of ClickOnce users that mage.exe and mageUI.exe do not provide the same functionality. MageUI has more features in it, and can not be run via command line. Microsoft has listened to my (multiple occurrences of) feedback about this, but unfortunately their priorities lie elsewhere.
      Good luck!
      Robin

      • David Harrison Says:

        Hi Robin,
        Thanks for the pointer to the MMU utility. I am currently re-engineering our ClickOnce deployment tool to use all the good features in the app. In the mean time, using our current ClickOnce process I came across an interesting issue.

        We created a new app and deployed it to our dev environment, no problems so far. Then using the package of files I created post the build process. I copied them to out test environment and run the ClickOnce deployment process, still no issue. Installed the dev version on to my PC and everything was OK, app runs fine. Went to install the test version and get a deployment error that stated I already had the app installed. After some investigation I found the following in the .application file <assemblyIdentity name="xyz.app" … the assembly name is actually xyz.proj.app.exe (the name has been changed to protect the innocent).

        Basically mage had take the assembly name, stopped at the first period character, trashed the rest of the name and appended the .app extension. so in the dev and test application file they had the same application identity name!

        This has now speeded up the re-engineering project but I was interested if this behaviour had been seen before ? It has been a while since we have been able to use multi periods in a filename (I am old enough to remember dos file names!)

        David

        • robindotnet Says:

          I don’t know of anyone who uses periods in their app name, but this doesn’t surprise me that it would take the first bit and ignore the rest. Have you considered just taking out the dot and using different assembly names for staging and production? Or changing the deployment with mage or mageui or mmu?

          Robin

  58. Augusto Breowicz Says:

    Hello,

    I have recently posted a ClickOnce related issue at the Microsoft Dev Center forums. Was wondering if by any chance you would have some spare time to take a look at it? Follows the link: http://social.msdn.microsoft.com/Forums/windows/en-US/86a45e69-879d-4b8d-a3b8-1040114dda7c/clickonce-shortcut-reference-loss-issues

    Thanks!

  59. Chakri Says:

    Hi Robin,
    You are the hope for me today.

    When I change the target CPU of my clickonce application from “Any CPU” to “x86” in Advanced compile options of the project properties, and publish the latest version to a shared location, I get a pop up message saying “The applicatin platform does not match the existing application on the server. Do you want to overwrite it.” with Yes and No options. When I say Yes then the app is successfully published to the shared location. But when I start the app (auto update clickonce), it gives a message “The application cannot be started”.
    The error details shows ” The deployment identity does not match the subscription. ”

    All the suggestions in google, seem to suggest uninstall and re-install the application in client’s, which is far from possibility and defeating the purpose of Click Once. So whats the best way to go ahead here?

    • robindotnet Says:

      The targeted CPU is part of the identity of a ClickOnce application. If you change it, you have to uninstall and reinstall the ClickOnce application. You can do this programmatically using the logic and code provided in my article about expiring certificates on MSDN, which is here. In this article, I show how to publish an update that basically updates, the uninstalls itself, then kicks off a new install from a new URL. This is handy for changing the identity, the targeted framework version, etc.
      Robin

  60. Chakri Says:

    Thats excellent Robin.
    Just incase if we want to avoid the message informing the user about the update, How would it be if we make the thread to sleep for a while before it pics up the new Url to new installed path.
    -Chakri

    • robindotnet Says:

      I don’t think that’s a good idea, because if you do it the way it’s done in the article, you’ve just uninstalled the user’s application. So why put off installing a new version?

      We found that users would rather know than not know, and we actually displayed a dialog saying “we are going to upgrade your application” before doing the uninstall. We gave them the chance to bypass the uninstall/reinstall once (we wrote a file to local application data to track this), so if they really needed to do something, they could, but next time it forced the update.

      And we put an “expiration date” check, so if it was past a certain date, they HAD to uninstall/reinstall to run the application. We had over a thousand customers when we last did the uninstall/reinstall, and we didn’t have any problems, or any complaints.

      Good luck,
      Robin

  61. vid Says:

    Hi Robin,
    Can you please help me out.
    I have a click once application published to a URL and i need to test it on windows 8 and IE 10 and having a little problem.
    When I open the appliation,.application (Manifest) file,the file is being displayed on the download manager which was not the case for XP and IE 8/9.

    I have tried some scenarios like edit download option through registry, group polices .. but nothing provide a feasible solution.

    Can you please assist.

    Many thanks
    vid

  62. John Pearson Says:

    hi – did you ever resolve the UpdateAsyncCancel causing the clickonce dialog to appear issue?

    http://social.msdn.microsoft.com/Forums/windows/en-US/b4a545ce-003f-4593-9dcb-88063eb52771/can-not-disable-the-autoupdate-of-clickonce-after-updateasynccancel

  63. Das Says:

    Hi Robin,
    Thanks for your time and patience in going over this.
    I have a ClickOnce Published application existing since long. The app is having .Net framework and Crystal Reports
    as prerequisites. The Application users are migrating to Windows7 from WindowsXP, most of them are not local admins on their machines.
    We made few changes to the App recently and when users try to install the app, it is prompting for admin user name and password. Since most of the users are not local admins, they are not be able to install the app.
    I even tried removing the prerequisites, still it is prompting. What is the work around for this?

    • robindotnet Says:

      There is nothing in ClickOnce that would cause it to prompt for the admin information. ClickOnce will not run elevated or do anything that requires elevated permissions. Are you certain it’s not the prerequisites?
      If you’ve published it to a webserver, try installing it and totally bypassing setup.exe by hitting the URL to the deployment manifest (http://yourplace.com/yourfolder/theapp.application). If you do this and it asks for admin info, then it’s the webserver asking for credentials to access the folder that the application resides in.

      Robin

  64. Chris Says:

    Hey Robin, I posted on the question about ” How to extend an existing certificate, even if it has expired” and it says my post is waiting for Moderation. Do you moderate it and approve it? I need to get some help on this asap.

    Thanks,

    Chris

  65. Shawn Berg Says:

    Robin:

    Using VS 2012. New to Lightswitch. Created a small application for our company. When I publish and specify the prerequisites (.Net 4.0, Windows Installer 4.5, and SQL 2008 R2) and that they should be downloaded from the internet, any PC that is 32-bit receives the following error: “SqlExpressChk.exe is not a valisdWin32 application”. So SQL Express installation is skipped. The other two prerequisites can be checked for and installed (or not installed) so there appears to be a compatibility issue with the SqlExpressChk.exe checker on 32-bit systems. Seems MS can create a checker for the other packages that runs on either 32 or 64 bit machines what is going on with this file?

    Are you aware of any updates to this file as I cannot find one and can’t believe I would need to custom code this checker file.

  66. Michael Says:

    Hi Robin:

    I have a clickonce application that programmaticlly checks for updates . This year we have an expired certificate; and we are moving from .net 35 to .net 40 (using VS 2012).
    I have read your article regarding the new feature about .net 40 and Microsoft claims it has fixes all expired certificate issues.
    However for my case, so far this is not true, the application was crashed at the very beginning. I set up detailed loggings (described in your article), the error message from the clickonce log is sth like “An exception occurred while determining trust. Following failure messages were detected: + Object reference not set to an instance of an object.”

    My application is targeting .net 40, but have 3rd party dependencies (Dlls) in .net 20.

    Have you heard anyone has the similar issue?

    Thanks,

    Michael

  67. Hesham Wahsh Says:

    Hi Robin:

    I’m using Clickonce to deploy my desktop application, but I wonder if there any way to make the Clickonce download only the updated files, I don’t need the user to download the full package every time I change one single file especially that I have a big size package and the users connect through GSM connection.

    Thanks,
    Hesham

    • robindotnet Says:

      If the files haven’t changed since the last deployment, ClickOnce won’t download them again. I know this is true of assemblies, not sure about data files. And when I say “haven’t changed”, I mean haven’t even been re-compiled. What happens with assemblies is that they are put in a separate folder under the ClickOnce cache, kind of like a “mini GAC”. When an update is discovered, ClickOnce compares the files on the server with the ones in the “mini GAC”, and if they are the same, it doesn’t download them again, it just copies the local one into the folder for the new version.

      The company I used to work for that used ClickOnce had a bunch of 3rd party assemblies included with the app. They were downloaded the first time, but after that, ClickOnce would just use the copy out of the local cache, because we rarely changed those assemblies. If we did update one of them, it would be copied and put in the local cache, replacing the one that was there before.

      Robin

  68. Mac Limlengco Says:

    PLATFORM VERSION INFO
    Windows : 6.1.7601.65536 (Win32NT)
    Common Language Runtime : 4.0.30319.18408
    System.Deployment.dll : 4.0.30319.18408 built by: FX451RTMGREL
    clr.dll : 4.0.30319.18408 built by: FX451RTMGREL
    dfdll.dll : 4.0.30319.18408 built by: FX451RTMGREL
    dfshim.dll : 4.0.41209.0 (Main.041209-0000)

    SOURCES
    Deployment url : file:///C:/Users/Acer%20Aspire/Desktop/Samlin%20&%20Vivant%20Sales%20’n%20Inventory%20System/Sales%20and%20Inventory.application
    Application url : file:///C:/Users/Acer%20Aspire/Desktop/Samlin%20&%20Vivant%20Sales%20’n%20Inventory%20System/Application%20Files/Sales%20and%20Inventory_1_0_0_0/Sales%20and%20Inventory.exe.manifest

    IDENTITIES
    Deployment Identity : Sales and Inventory.application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a2a4fbf55e47588f, processorArchitecture=msil
    Application Identity : Sales and Inventory.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a2a4fbf55e47588f, processorArchitecture=msil, type=win32

    APPLICATION SUMMARY
    * Installable application.

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * An exception occurred while determining trust. Following failure messages were detected:
    + Value does not fall within the expected range.
    * Activation of C:\Users\Acer Aspire\Desktop\Samlin & Vivant Sales ‘n Inventory System\Sales and Inventory.application resulted in exception. Following failure messages were detected:
    + Value does not fall within the expected range.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

    WARNINGS
    There were no warnings during this operation.

    OPERATION PROGRESS STATUS
    * [11/13/2013 5:17:16 PM] : Activation of C:\Users\Acer Aspire\Desktop\Samlin & Vivant Sales ‘n Inventory System\Sales and Inventory.application has started.
    * [11/13/2013 5:17:16 PM] : Processing of deployment manifest has successfully completed.
    * [11/13/2013 5:17:16 PM] : Installation of the application has started.
    * [11/13/2013 5:17:16 PM] : Processing of application manifest has successfully completed.
    * [11/13/2013 5:17:17 PM] : Found compatible runtime version 2.0.50727.
    * [11/13/2013 5:17:17 PM] : Detecting dependent assembly Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil using Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil.
    * [11/13/2013 5:17:17 PM] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
    * [11/13/2013 5:17:17 PM] : Detecting dependent assembly WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil using WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil.
    * [11/13/2013 5:17:17 PM] : Detecting dependent assembly System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [11/13/2013 5:17:17 PM] System.ArgumentException
    – Value does not fall within the expected range.
    – Source: mscorlib
    – Stack trace:
    at System.Deployment.Internal.Isolation.IDefinitionAppId.EnumAppPath()
    at System.ActivationContext.CreateFromNameAndManifests(ApplicationIdentity applicationIdentity, String[] manifestPaths)
    at System.ActivationContext.CreatePartialActivationContext(ApplicationIdentity identity, String[] manifestPaths)
    at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
    at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    * [11/13/2013 5:17:17 PM] System.ArgumentException
    – Value does not fall within the expected range.
    – Source: mscorlib
    – Stack trace:
    at System.Deployment.Internal.Isolation.IDefinitionAppId.EnumAppPath()
    at System.ActivationContext.CreateFromNameAndManifests(ApplicationIdentity applicationIdentity, String[] manifestPaths)
    at System.ActivationContext.CreatePartialActivationContext(ApplicationIdentity identity, String[] manifestPaths)
    at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
    at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.
    ———————————-
    I dont know what to do. Please help me

    • robindotnet Says:

      “Value does not fall within the expected range” errors are always because the app is referencing multiple assemblies with the same name but different versions, or there are circular references in the project. If you can’t find that, please post in the MSDN ClickOnce forum, where more people are available to help you.

  69. Jamie Kiefner Says:

    Hi Robin.
    I have a WPF application that i’m using ClickOnce to deploy. The installation is throwing errors when the install is attempted on machines inside a particular domain. The domain in question is in the UK, but i believe that is irrelevant. This particular sub-set of installations are the only ones thus far having any issues. Installation/updates are occurring without any issues in the US.
    The installation seems to get past the .NET 4 pre-req without any trouble, but the infamous “contact the software vendor” popup error occurs shortly after. The log file is throwing an Invalid URI: The hostname could not be parsed error and the installation dies. However, there is nothing wrong with the URI. In the case i’m attaching the log file for, the user has a roaming profile on a network share, but It fails without the roaming profile as well.
    Here is the error log:
    SOURCES
    Deployment url : file://mlfile101/users$/joe_smith/Downloads/Retention.Client.application
    Deployment Provider url : http://staging.mercurynewmedia.com/BSMClickOnce/Client/Retention.Client.application

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\mlfile101\users$\joe_smith\Downloads\Retention.Client.application resulted in exception. Following failure messages were detected:
    + Invalid URI: The hostname could not be parsed.

    Here is an example of a non-roaming profile error:
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://agnanalyzer.bsmconsulting.com/Client/Retention.Client.application resulted in exception. Following failure messages were detected:
    + Invalid URI: The hostname could not be parsed.

    • robindotnet Says:

      I actually talked to the ClickOnce guy at Microsoft about your question. He said he has never seen anything like this before, and he wondered if it’s a problem with the $ sign or with the use of the roaming profile. It also looks like the .application file is being downloaded to the user’s computer and activated from there. It should be activated from the deployment itself. Try just launching setup.exe (which you CAN copy to the user’s computer and then run). It’s unclear if you are copying the .application file to the user’s computer and running it, or copying over the whole deployment.

  70. Vincent-Philippe Lauzon Says:

    Hi Robin,

    I read your very good article on http://blogs.msdn.com/b/microsoft_press/archive/2014/01/29/from-the-mvps-diagnostics-and-logging-in-windows-azure-web-sites.aspx.

    I was unaware of those features on web sites. It is great as it allows us to put the logs of different sites on different blob containers and / or different tables.

    Now… what is the equivalent on cloud Services? Can we control the table name where logs are persisted to in a Cloud Service (e.g. Worker Role) in order to log in different tables of the same storage account for different Cloud Services?

    Cheers,

    • robindotnet Says:

      Thanks for your feedback, I’m glad you found the article useful.
      In Cloud Services, you can write diagnostics, but you can not control the table name. They will be placed in a table in the specified storage account with the name WADLogsTable. This table does contain a role name, so you can filter it based on the service. I’ve tried using different storage accounts, but it’s too complicated if you have very many services. I use Cerebrata’s Azure Management Studio to look at and filter table storage. This product will also let you pick a deployment, and will filter the diagnostics for you and only show the entries for that one service. Pretty handy.
      Robin

  71. Roy Thompson Says:

    Hi

    I have a strange problem with ClickOnce.

    I am trying to deploy an application and am getting the message:

    “Failed to copy file ‘x\app.exe.deploy’ to ftp://blah/app.exe.deploy. Unable to add Application Files/blah/blah.exe.deploy to the web site. Could not find a web server at blah on port 21. Please check to make sure that the web server name is valid…….

    I can however deploy another application to the exact same ftp site using the exact same settings and the same installation folder (albeit using a different application name)

    Help!!

    • robindotnet Says:

      Does the application name have any non-alphanumeric characters in it, like ampersand or space? If that’s not the problem, then the deployment information in the two applications must be different. Check the spelling carefully and make sure you’re not using a numeric 1 instead of an ‘l’ or something like that. Also, make sure you have security access to the folder you’re deploying it to, and that you can create folders in that folder.

  72. Roy Thompson Says:

    Hi Robin

    Thanks for the quick reply

    No, no special characters. What is odd is that using Filezilla (logged in with the same credentials) I can create a sub folder in that deployment folder. I can even SEE the Application Manifest and the deploy file listed – so the directory structure is being updated but the files are not actually being copied across. If I try and copy the file back to my machine using filezilla it tells me that there is no such file or directory – even though it is listed. It seems that ClickOnce is telling the remote site that it is going to copy these files and makes an entry in the file table but then fails when actually copying the files.

    Roy

    • robindotnet Says:

      I would try running fiddler and look at the request/response information and see what directory it’s really going to. So are some of the files getting deployed but some not? Like do the top files work, but not “Application Files” and its subfolders? Are you using the same credentials with FileZilla and Visual Studio?

  73. Roy Thompson Says:

    Hi Robin

    Thanks again

    I have downloaded fiddler. What do I have to do to get it to see my click once session? When I run the click once deployment nothing is being recorded in fiddler.

    Yes, the credentials are identical

    Roy

    • robindotnet Says:

      Check the fiddler site for instructions on using it. When you say “when I run the click once deployment…”, do you mean when you install it? You should see something in fiddler showing the traffic going between your computer and the internet.

  74. Roy Thompson Says:

    Ok – so it gets weirder

    I think that the reason it is not deploying is because the .exe is 9409 Kb

    Which seems a little large!!

    The reason for this is that I originally had some forms in the application that used the MS Report viewer and this insisted on pulling in some large dlls.

    So as a temporary measure I took these out, removed the references, used the unused references to check I had not missed anything and rebuilt the application.

    But it is still coming up at 9409 Kb for the exe which is crazy since it now only consists of about 15 forms and associated code.

    I cannot see why the .exe is still so large.

    Roy

    • robindotnet Says:

      The size of your exe file has nothing to do with ClickOnce. This is determined by the build. I have no idea what might cause that; you might try posting to the C# or VB language forum on MSDN.

  75. Conor Says:

    Hi Robin, I followed your How to set up an HTTPS endpoint for a Windows Azure web role blog entry (https://robindotnet.wordpress.com/2012/07/02/how-to-set-up-an-https-endpoint-for-a-windows-azure-web-role/). I have configured the SSL cert in the portal and referenced it in the settings files as per your directions. I’ve also added the basicHttpBinding to the web.config file with the configuration you suggest. The WCF web services publishes fine to Azure, and I can browse the metadata there, as well as successfully adding a Service Reference from a client application. However, when I try to call a method from it from the client, it throws an exception both if I configure the client with a basicHttpBinding (“The provided URI scheme “https” is invalid, expected “http”) and a basicHttpsBinding (“The remote server returned an error: (404) Not Found.”). Which one of these bindings is the correct one to use from the client? Either way, do you know why an exception is being thrown? The SSL certificate is for the URL https://MyWebService.cloudapp.net – I noted that you mentioned the SSL cert as a possible source of the problem in another comment. Two things I could think of that might diagnose the issue: (1) Is the URL of the cert okay above? As in, is it okay to include the .cloudapp.net in the URL or does it have to be a standalone URL (e.g. https://MyWebService.com )? (2) Is there a way to check that the SSL cert is correctly configured and working? Is just visiting the URL of the service enough provided it doesn’t show a certificate warning?

    • robindotnet Says:

      Hi Conor,
      I am assuming you purchased an SSL certificate for a particular domain and uploaded it to the cloud service using the Azure portal. The domain has to match the URL. For example, if my company was Contoso, I would buy an SSL certificate for *.contoso.com, and then set up a CNAME record pointing myservice.cloudapp.net to myservice.contoso.com. I would be seriously surprised if you could buy an SSL certificate for the domain “cloudapp.net”, since this domain is owned by Microsoft.
      Additionally, you need to set the web.config on the web role to be https. If your binding is basicHttpBinding, you need to have a binding Configuration of “secureHttpBinding”, as displayed in the article. There is no such thing as a binding of “basicHttpsBinding”. And third, you must have an HTTPS endpoint defined in the service configuration.
      I’m not sure what you mean when you say the SSL certificate is for URL “https://mywebservice.cloudapp.net” — where did you get the certificate? Did you get it from a valid Certificate Authority? You might want to doublecheck what you’ve done with the original blog article, it sounds like there’s something awry.

  76. mutigozel Says:

    Hi Robin,

    First of all let me thank you for your blog. It is helpful beyond any expectation. I read all your posts about ClickOnce Deployment and their comments.

    I have an issue that I could not figure out a solution for it. I developed a VSTO application and trying to host it’s ClickOnce Deployment using Azure Blob. I purchased a certificate from CA, but still could not get over the Smart Screen Filter “PC at risk” message.

    Here are the screenshots for the message screen:



    And, here is the link for the bootstrapper “setup.exe” of my VSTO App.

    http://halfmelon.blob.core.windows.net/align/setup.exe

    Can you please, help me on this?

    Regards,

    Muti

    • robindotnet Says:

      If you read both of the articles about ClickOnce and Windows 8, you’ll find the second one mentions something called “reputation”. There have to be some unknown number of deployments installed for that app with that certificate, and then one day the smart screen filter will stop working. I have given repeated feedback about this to Microsoft, but they don’t show any signs of changing this. I understand your frustration. If I could fix it, or tell you exactly how many times the app must be installed, I would.
      Robin

      • mutigozel Says:

        Hello Robin,

        Sorry for skipping the “reputation” thing, and bothering you with this. I figured out a solution. Renaming “setup.exe” to something like “InstallMyApplication.exe” did the trick.

        Regards,

        Muti

        • robindotnet Says:

          It’s no problem. By the way, there’s no way that renaming setup.exe would impact the likelihood of the smart screen filter showing up. It is more likely that you had enough installations to reach whatever reputation metric Microsoft is using. 🙂

  77. Dane Vinson Says:

    Hello Robin,

    My name is Dane Vinson and I’m the Systems Architect for a software company which is a Microsoft ISV Gold Partner and a member of the Azure Advisors Program. We’ve been using ClickOnce as the primary client deployment technology for our enterprise application since 2006. Almost without exception these deployments have been flawless. To say that we love ClickOnce would be a major understatement.

    Recently we started receiving reports of ClickOnce failures when using the Chrome browser. A little research has revealed that this is indeed a real issues and worse, it appears there’s little hope Chrome will support ClickOnce in the future.

    I’ve come across your blog and forum posts a number of times over the years and thought it possible you might some have further insights into this issue with respect to possible solutions, work-arounds and the future of ClickOnce in general. We would very much appreciate hearing any input you might have. Please feel free to contact me at the provided email at your leisure.

    Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: