List Of ClickOnce Articles

Here’s a quick reference to my ClickOnce articles.

Windows 8 and ClickOnce — the definitive answer explains how ClickOnce applications work on Windows 8, and what you need to do if you are deploying from the internet zone.

Host your ClickOnce deployment for pennies per month explains how much it costs to use Azure blob storage to serve up your ClickOnce deployments. It’s dirt cheap!

How to host a ClickOnce deployment in Azure blob storage explains how to use Azure blob storage to serve up your ClickOnce deployments. If you don’t have access to a server, this can be a really inexpensive way to host your ClickOnce application.

How about a bootstrapper package for SQLServer Express 2008 R2? explains how to make a bootstrapper package for the latest version of SQLServer Express to use as a prerequisite to a ClickOnce application.

How do I programmatically find the deployed files for a VSTO Add-In? explains how to write code to be used in an Office Add-In written with VSTO to access the deployment files. Hint: It’s not in the same place as the executing assembly.

MIME Types for ClickOnce deployment details the required MIME types required for the different applications you can deploy with ClickOnce, and shows you a way to define them yourself if using an Apache webserver.

Enhanced logging in ClickOnce deployment to help you diagnose installation problems.

What’s new in ClickOnce deployment in .NET 4.0 summarizes the new features available in VS2010 and .NET 4.0, and provides links to articles providing more detail.

The Future of ClickOnce Deployment talks about the continuing support from Microsoft.

How to pass arguments to an offline ClickOnce application, even if it’s deployed to a file share. This came along with the release of .NET 3.5 SP-1 (when they added file associations), and most people don’t realize you can do this now. I show you how to call a ClickOnce application and pass the arguments in different ways, and how to read and parse them in the application itself.

How to deploy the SQLServer Compact Edition software locally rather than deploying it as a prerequisite, which gives you control over the version installed and reduces the installation steps for your customer.

The published MSDN article about ClickOnce deployment and Certificate Expiration. This explains the problem that can occur when your signing certificate expires, in what cases it applies, and how to handle it. This is the updated and official version of my blog posting about this subject. This also includes how to use MakeCert to make your own certificates.

How to extend an existing certificate, even if it has expired. This explains how to use RenewCert. This is a companion article to the MSDN article on Certificate Expiration.

How to move a ClickOnce deployment from one deployment location to another.

Installing a ClickOnce application for all users (short answer: you can’t). I asked the product team about this again in February 2010, and it is completely counter to the design of ClickOnce deployment, so I wouldn’t expect to see if any time soon.

Where do I put my data to keep it safe from ClickOnce updates? This offers a solution that gives you more control over when your data is modified, and makes sure it doesn’t get lost when you publish an update to your application.

How to deploy a ClickOnce application to localhost. If you install IIS on your development computer, you can deploy your application locally and test your deployment from either your development computer, or another computer on the same network.

How to create a desktop shortcut for your ClickOnce application. This shows how to do this programmatically.

How to create a desktop shortcut for your ClickOnce VB application. This is an addition to the first article. The startup of a VB application is different from a C# application; this addresses that difference and shows VB developers how to handle it.

Microsoft Windows Updates and .NET 3.5 SP-1 How to migrate from .NET 2.0 or .NET 3.0 to .NET 3.5 SP-1, and information about the Client Framework.

How to install multiple versions of the same ClickOnce application. You would want to do this if you wanted to have both the production version of your application and a QA version installed at the same time.

ClickOnce and Expiring Certificates This is the original version. I’ve left this in for nostalgia and because it is the first post on my blog. You should read the MSDN article for the final and official version. This one is accurate, but the MSDN article is more thorough and includes .NET 4.0.

53 Responses to “List Of ClickOnce Articles”

  1. Walt Kraybill Says:

    In ClickOnce if an XML file is changed in the source publish directory on the server without re-publishing the application, will the clients pick up that the file changed and download the affected XML file?

    • robindotnet Says:

      Short answer: No. First of all, if you change the file on the server, your customers will not be able to download the deployment at all, because the hash on the file will be different from what it is in the manifest. You could change the file and then re-sign the deployment with mage or mageUI, but it still wouldn’t be picked up. For ClickOnce, you need to publish a new version, or update the version that’s there. ClickOnce only installs an update if the server has a different version number than the client.

  2. Domnica Says:

    Hi,

    I have some files needed for the application to run (dll-s that I cannot add as references because they are not .NET-style, other config files, etc, so they are not deployed by ClickOnce technology), so after publishing the app, I will copy by hand these files to the server, and when app starts I want to copy them dinamically from server to client local disk. (if this is the very first time the app is running on that machine and these files don’t already exist on local disk). They will not modify from one version to another, so I won’t copy them to server every time.

    To copy these files from server to client, of course I have to know server (deployment) location and client location (directory where the app starts on local disk).

    For server location I tried to use ApplicationDeployment.CurrentDeployment.UpdateLocation, but it gave me http://193.33.94.254/MyApp/ MyApp.application (the content of deploymentProvider tag), so not the place where I can find those files I copied by hand.

    For client location I tried to use ApplicationDeployment.CurrentDeployment.DataDirectory, but again this is not the directory from the local disk where the .exe locates.
    So I guess for client side I could use the old System.Windows.Forms.Application.StartupPath, right?

    But what can I do about server location? How to obtain http://193.33.94.254/MyApp/ Application%20Files/ MyApp_1_0_0_7/ let’s say?

    Thanks,
    Domnica

    • robindotnet Says:

      Hi Domnica,

      First, system.windows.forms.application.startupPath will work if it’s a desktop app. You can also check my blog post about finding your files in a VSTO application, the codebase property of the assembly should also work for a desktop application.

      Second, you can’t find the deployment provider URL unless it is an online-only application. You only choice is to hardcode it in the app somewhere (never a good idea).

      Third, this seems like a lot of trouble. You should be able to add the dll’s to your project and on each one, set the build action to content and set “copy to output directory” as “copy always”. If you do that and build it, you should see them in the \bin\ folder. If you then check the Application Files dialog, they should be displayed there. They will be included in the deployment in the same folder as your [exe]. You can even put them in a subfolder under your project and set the properties as noted, and they will show up in a subfolder under your [exe]. (This is what we do with 3rd party dll’s).

      Note that ClickOnce does incremental updates. So if you deploy those dll’s and they don’t change, when ClickOnce checks the application manifest (the app.exe.manifest file) for the list of files, it compares the info on the files against the local copy, and if they are the same, it copies it from the local cache to the new folder instead of copying it from the network again.

      Hope this helps.
      Robin

  3. Domnica Says:

    Hi Robin,

    Thank you very much for your response.
    Yes, these dll’s I added them to my project and manage to be deployed, so it’s ok. They never change.

    The main problem are the config files, some of them should be copied to client local disk because they should be modified locally (for example one of them keeps the last username logged in the application – this information should remain local, so the user on that computer can login next time with the same username).
    So I don’t want them to be deployed.

    So I used ApplicationDeployment.CurrentDeployment.UpdateLocation, obtain something like http://193.33.94.254/MyApp/MyApp.application, remove “/MyApp.application” from the string and it remains http://193.33.94.254/MyApp, that should be the directory on the server where the updates comes from. Is this completely wrong? I saw this on some post….

    So these config files I will put them by hand on the server, the application will copy them (from code) if they don’t exist already locally, in ApplicationDeployment.CurrentDeployment.DataDirectory, and they will remain there, at least until the next update.
    Dou you think this is ok?

    Thank you again,
    Domnica

  4. FrancescPG Says:

    Dear Robin.Net:

    Your blog is amazing! There are lots of useful information.

    However, I’ve found some difficulties while trying to deploy an application: I have got a windowsForms application, which uses severeal Libraries (also included in the current solution). The problem is that these libraries has their own resources, which I have added by setting them as “content” and putting “always copy” in the “copy in the results directory” property.

    Well, when I try to publish my application, these resources won’t get copied and I can’t find them in the (app folder)/resources/…

    Particularly, I have added a very heavy directory (more than 300 mb) which are input files for one of the processes that my application performs.

    • robindotnet Says:

      Thanks for your feedback, I’m glad you’ve found this helpful.

      For the resources belonging to the other libraries, I know one person in the forums had that problem, and they ended up adding links to those resources to the main project, so it would include them in the deployment. That way, they only had one copy of the resources, but they were picked up because the main project linked to them.

      300MB? Really? You’re deploying 300MB every time? Do these files change, or are they static? They should only get copied down the first time. ClickOnce caches the downloaded files, and if they don’t change, uses copies from the local cache instead of downloading them again. (note: doesn’t change means you also don’t recompile them). However, if it doesn’t work for you for some reason, there are some other ways to get those files.

      You can kick off a background thread and download them from the server using the WebClient class. This way, you could make sure you only download them once. I would put them in LocalApplicationData (see my blog article about keeping your data safe from ClickOnce updates).

      Another thing we did was we created a small WinForms app that had a bunch of resources. The application installed, and then copied the resources over to LocalApplicationData so the ClickOnce application could find them. We would show the UI that showed it copying the files, and then shut it down. We deployed this as a ClickOnce application. In our case, the user ran it separately, but we could just as easily have had our main application check for the files, and if they weren’t there, invoke the resource application. Sneaky, but effective.

      Just something to think about. Good luck.

      Robin

  5. Rajeev Singh Says:

    Hi Robin,

    I have one strange issue with the Clickonce build. I am using NAnt build script for building the project
    and creating the deployment files.Everything is running fine.

    we have build server from where one job is running to execute the batch file which calls the build scripts.

    Issue: we are using a web portal to run the job. After running some steps the job is throwing an exception while
    signing the manifest files the message : Unable to open the certificate. The system cannot find the file specified

    whereas all the files and certificate are at same place.The same build script is running successfully locally and also at the server.
    But the error comes only if the build server is in loggeg off state .

    The work around as of now we have that we need to login to the server through RDP and then run the job from the web portal by doing
    the job is successfully executing.

    Looking for a permanent solution so that if new developer wants to build he just have to run the job from the portal.

    Any suggestion how can I fix this issue.

    Rajeev

  6. DDatabasin Says:

    Thanks for the great articles (and flow chart). I have a quick question though – our application is a standalone Access MDE along with the DSN to connect to the SQL Server for linked tables. For the purposes of your flow chart, would this qualify it as a VSTO application?
    Thanks,
    DDB

    • robindotnet Says:

      No, VSTO stands for Visual Studio Tools for Office, which is developed using Visual Studio. If your application is contained within Access, it is not a VSTO app.

  7. BFerguson Says:

    Robin,

    I am not a programmer and don’t know anything about oneclick technology. What I have is a problem with my virus scanner slowing a oneclick application down. How do identify the target application to my virus scanner exclusion list (MacAfee) and not just the application reference file?

    • robindotnet Says:

      I doubt it has anything to do with ClickOnce applications; it probably scans anything that comes across the internet to your computer. Have you actually run the installation of the application with McAfee turned of versus turned on and seen a discernible difference? But only with C/O apps, or with anything? If this is really the case, recommend you ask the McAfee people.

  8. Ramesh Says:

    Hi Robin,
    I have a question here. With ClickOnce technology, is there any possibility that we can place the custom Help file (external file) in Start –> Program Files? When clicking on the Help link, the file should open. This can be easily achieved in the traditional Setup and Deployment project. Please let me know if this is possible with ClickOnce. My email id : ramesh.pothuraju@gmail.com

    thanks,
    Ramesh.

    • robindotnet Says:

      ClickOnce won’t do that, but you can do that programmatically from your application. Just have it check the start menu for the option, and if it isn’t there, add it. If it is a file type already recognized by Windows (like CHM), it should work.

  9. Jignesh Sura Says:

    Hi Robin,

    I have a quick question about ClickOnce. Initially we installed our product to our clients machine using Clickonce and now we are moving to MSI approach. i wanted to know if there is a way to remove the Clickonce version from client machine.

  10. sharan Says:

    Hi Robin,

    I published my clickonce app to my local pc. I created a batch file to launch the app. But i dont know how to pass arguments to the app. If i give something like ///.application? , i am getting errors.. Help me..

  11. Francesc Says:

    Dear RobinDotNet,

    I would like to publish my app using clickOnce deployment. There a problem, though: let’s supose you a have a Windows forms application (project A) that references a class library project (project B). Suppose project B has got one or severel data files (such as text files, images, excel…). How on earth do I get this files in my deployment? It seems that the resources in the secondary assemblies don’t get copied in the deployment destination. Do I need to manually add the resources into the main project?

    Thank you in advance!

    • robindotnet Says:

      You’re right, secondary resources are not included in the main deployment. To get the files in the deployment, you have to add them to the main project. You should be able to do that, and reference them there from the secondary assembly.

  12. Jason Says:

    Hi Robin,

    I was just reading your article regarding ClickOnce and expiring certificates (http://msdn.microsoft.com/en-us/library/ff369721.aspx). Of particular note is the mention of .NET 4.0 taking care of the issue in all cases. it seems there is at least one case where there is still an issue.

    When trying to move a ClickOne deployment (as explained in https://robindotnet.wordpress.com/2010/01/17/how-to-move-a-clickonce-deployment/) if your deployment in the new location is signed with a different certificate than the one used to sign the deployment in the original location you will still get an “Applicatoin cannot be started” error when trying to run the app. The actual error in the detail summary is “The deployment identity at the deployment provider is not the same as the original deployment identity.”

    • robindotnet Says:

      I would doublecheck your URLs. Starting with .NET 3.5, the certificate is part of the identity, but doesn’t trigger any errors about the identity changing. If it did, it would do it in all cases, not just this one.

  13. Tobias Smoktun Says:

    Hi Robin,

    i working on a problem, which i can’t fix.
    I published my application locally and moved it to an VM. i can install this app.
    when i publish a newer version of my app locally and move it to my VM, the application doesn’t recognize the newer version…
    i moved the app_0_1_2_24 folder and moved and replaced the app.application and the setup.exe .. how can i fix this ?

    • robindotnet Says:

      You’re copying the deployment to the VM and trying to install it? What is your installation URL, and are you sure you are replicating the publishing folder exactly right? The top folder has the .application file and setup.exe. Under that is the Application Files folder, and in that is the versioned folder.
      Robin

  14. Marouane Timsahi Says:

    Hi I’ve published my application through ClickOnce option in VS 2008 to a ftp account in a Linux hosting when I’want to install application this error occurred the application is improperly formatted then I think is a problem in types (.application .manifest) and I’ve apply this post (MIME Types for ClickOnce deployment ) in your wordpress blog an without any positive result :s

    really i want your help plz

    • robindotnet Says:

      Are you trying to install the application with FTP, or with HTTP? (FTP doesn’t work for installing, just for deploying). Please post more information, or post your question to the MSDN ClickOnce forum.

  15. James Says:

    Hi Robin and thanks for your help in advance.

    We are having problems with a subgroup of customers running Firefox/Chrome and NOT having .NET Framework Assistant enabled. This results in xyz.Application download instead of offering them an option to run the clickonce app. Of course, some of them download the application and try to launch it from explorer subsequently, which results in an startup error “Deployment and application do not have matching security zones.”.

    Do you think is there an intelligent workaround? How could we achieve 100% success on running the app?

    Thanks,
    James

    • robindotnet Says:

      We messed around with this quite a bit, and couldn’t come up with a clean solution. What we ended up doing was on the web page where they can install the product, we put a small “Not using Internet Explorer?” link. It looks like this. The links are live, pointing to the different plug-ins needed. This did help. The only 100% solution I can think of is for Google and Firefox to acknowledge and handle the MIME type for the deployment manifest (.application file). The irony is that Google uses ClickOnce to install Chrome, but then doesn’t support it in Chrome.

  16. BAckouche Says:

    Hello,

    I found a solution that I’ll be glad to share with you. You can do it with MageUI or with Ms VIsual Studio. I am really delighted to use ClickOnce as my deployment now works both with IE and CHrome and FIrefox 🙂

    If you MageUI, you have to check “Include the provider URL in the Manifest” and type the associate URL of the Webserver. If you use Microsoft Visual Studio, then on the Publish Tab property of the project, click on the “Update” button, then in the update location, type the URL of the publishing Web Server.

    Hope this helps,
    Philippe Backouche

    • robindotnet Says:

      Thanks, Phillippe. I’m not really sure what problem that is a solution to. If you’re talking about the Firefox/Chrome issue, the problem is that they do not recognize the MIME types for a ClickOnce deployment, so you end up having to download the .application file and double-click on it to run it, which doesn’t always work. AFAIK, the only way to get ClickOnce to work the way it’s supposed to for those browsers is to install the add-ins for those respective browsers.
      Robin

  17. Ryan Saint Says:

    Robin,

    I have an issue I was wondering if you could help me with. I have done just about all the “Googling” I can handle so I thought I would ask you. I have a new application I built that I decided to deploy via ClickOnce in VS2012. Everthing installs and updates perfectly on my machine and others machines when the users are admins but when I try to install it the first time for a standard user I get an access denied error to the machine.config file.

    Now I know I can log in as Admin adjust the NTFS permissions on the .config file or just the entire Framework folder then log back in as the standard user and the application will install, but I would like to figure out a way to not get the Access Denied error the first time the user goes to install. Now I checked about 5 machines in my organization and all of the NTFS permissions are the same. Is there a way to avoid my application even needing to use this file. Please help if possible.

    Below you will find the error messages.

    Error Parsing
    C:\Windows\Microsoft.NET\Framework\V4.0.30319\config\machine.config
    Parser returned error 0x80070005

    and

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

    SOURCES
    Deployment url : file://pdcfp1/Departments/ALL/APPLICATIONS/HSLIFT/Lift%20Test%202013.application

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\pdcfp1\Departments\ALL\APPLICATIONS\HSLIFT\Lift Test 2013.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\Framework\v4.0.30319\Config\machine.config’ is denied. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config)
    + Access to the path ‘C:\Windows\Microsoft.NET\Framework\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
    * [7/25/2013 7:43:43 AM] : Activation of \\pdcfp1\Departments\ALL\APPLICATIONS\HSLIFT\Lift Test 2013.application has started.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [7/25/2013 7:43:43 AM] System.Configuration.ConfigurationErrorsException
    – Configuration system failed to initialize
    – Source: System.Configuration
    – Stack trace:
    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
    at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
    at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
    at System.Configuration.ConfigurationManager.GetSection(String sectionName)
    at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
    at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
    at System.Diagnostics.DiagnosticsConfiguration.Initialize()
    at System.Diagnostics.DiagnosticsConfiguration.get_Sources()
    at System.Diagnostics.TraceSource.Initialize()
    at System.Net.Logging.InitializeLogging()
    at System.Net.Logging.get_On()
    at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
    at System.Net.WebRequest.Create(Uri requestUri)
    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\Framework\v4.0.30319\Config\machine.config’ is denied. (C:\Windows\Microsoft.NET\Framework\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.BaseConfigurationRecord.ThrowIfInitErrors()
    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
    — Inner Exception —
    System.UnauthorizedAccessException
    – Access to the path ‘C:\Windows\Microsoft.NET\Framework\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)
    at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName)
    at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions)
    at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName)
    at System.Configuration.ClientConfigurationHost.OpenStreamForRead(String streamName)
    at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

    COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

    Thanks,

    • robindotnet Says:

      What ARE the permissions on your machine.config file by default? In mine, users has Read and Read&Execute permissions. I think ClickOnce uses this file to connect back to the deployment in case you have proxy information set up in there. So there’s nothing you can do to keep ClickOnce from wanting to read the file. The question is, what are your permissions, and is your company changing them from teh defaults because they don’t want people to look at the file?

      Robin

  18. Asad Says:

    have a c# windows form application including access 2007 database ,
    application is working fine,
    but problem is,
    now we want to run this application through LAN,
    in LAN connection,there is one server,
    the query is —>> only from the server user can edit/update and after updation all the database automatically updated in all the connected pc..
    how can i do this??

    can you please help me in this!!!!

    How to make this kind a application?? What to Add in my Application,please help me in full discrip.

    reply on playerzz59@gmail.com

  19. khurramshahzad Says:

    Hi, we are facing an issue, One of the use was using our application which was deployed as clickonce, recently we change his login name ‘Domain\abc’ to new name ‘Domain\xxx’. We re installed the application under his new user profile, it is showing some strange behaviors..
    1. still Installs in his old profile folder ‘c:\users\abc’
    2. this application send current user default credentials to server.. and after logging with new account, this newly installed clickonce app, sending his old domainloing ‘Domain\abc’..

    any idea please..

    regards

    • robindotnet Says:

      #2 depends on what API you are using to acquire those credentials. It’s weird that it’s installing to the old folder, there must be something weird about how the user is set up — is it aliased? Check the API you are using to get the credentials from the server — you might not be using the right one.

  20. Brad Says:

    Hello,

    I have a VS2010, .Net 4.0 windows app that is being published via ClickOnce to a network share \\server\share\Publish. There are Risk Management controls on this app, so it gets a bit complicated from here. The developement team can deploy at will to this Publish folder. However, before users can receive application updates, any changes have to go through a Risk approval process. Once changes are approved, the deployment manifest is modified, re-signed, and copied to \\server\share\Install. Only the risk managment team has write access to the Install folder so they control what version is the ‘production version.’ The original deployment manifest remains in the Publish folder so the development team can test pre-release versions. Everyone has read access to both folders, but users install and receive updates from the Install folder.

    This setup works perfectly for 95% of my users. A handful of users encounter an ‘Autentication Error’ when tring to launch the deployment manifest from the Install folder. However, these same users can install from the Publish folder without error. I’m thinking the issue is being caused by the changes we have to make to the deployment manifest. We change the Start Location using MageUI.exe to reflect the manifest residing in the Install folder. We also change the path to the application manifest since it is no longer located in sub-folders below the deployment manifest file. The modifed deployment manifest is re-signed with the same certifcate used during the original publish from VS.

    Here are the details when this error occurs:
    PLATFORM VERSION INFO
    Windows : 6.1.7601.65536 (Win32NT)
    Common Language Runtime : 4.0.30319.1008
    System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll : 4.0.30319.1008 (RTMGDR.030319-1000)
    dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll : 4.0.31106.0 (Main.031106-0000)

    SOURCES
    Deployment url : file://server/share/Install/MyApp.application

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\server\share\Install\MyApp.application resulted in exception. Following failure messages were detected:
    + Downloading file://server/share/Install/MyApp.application did not succeed.
    + Access to the path ‘\\server\share\Install\MyApp.application’ is denied.
    + Access to the path ‘\\server\share\Install\MyApp.application’ is denied.
    + Access to the path ‘\\server\share\Install\MyApp.application’ is denied.

    Originally I though this was a network access issue, but if that were the case the users wouldn’t be able to see MyApp.application launch it. I have verified and re-verified that everyone has read access to both the Install and Publish folders. Do you have any idea what could be causing this issue?

    Thanks!

    • robindotnet Says:

      This is your first clue: “Access to the path ‘\\server\share\Install\MyApp.application’ is denied.”.
      They don’t have permission to access that file on the server or share.

      • Brad Says:

        That’s exactly what I thought initially. However, if they didn’t have access to the network share, they would get an “Access is denied” error from Windows Explorer before the system ever recognizes the file as a Click Once manifest. The fact that it attempts to run the installation tells me that they have enough access to know the file they’re opening installs a Click Once application. Furthermore, I can place other files in the same location and the users can access those with no issues. Any other ideas?

  21. Roy Molenaar Says:

    Hi Robin,

    I have this problem with clickonce validating my .net application (iexplore)
    All manifests seems to be generated without any problem using MsBuild tasks.
    After that I’ve signed resp. app.exe, app.exe.manifest, app.application and setup.exe successfully (SignTool/Mage 4)

    If I open publish.htm and select “launch” the log file says:

    +Reference in the manifest does not match the identity of the downloaded assembly app.exe

    What could be the cause of this problem.

    Hopefully you can help me out.

    Thanks in advance!

    Roy Molenaar

    • robindotnet Says:

      This error is caused by a mismatch between the version deploying and the version in the manifest. Check and see if you are doing the signing or building of the exe (and signing the exe) *after* building the manifests.

  22. Goran Says:

    Hi Robin

    I’ve got problem with clickonce application. I tried to find answer on net an on this site too, but without success. Application has been published on local folder and after that copied on web server (Win 2008). We used url from shortcut manually inserted in favorites and in startup. Client machines were WinXP 32 bit. Everything were fine till we changed servers and clients.

    Deployment process stayed the same. New server is 2008 R2 and clients Win7 32bit. Application works fine but loading from web server is too slow and seems like it is installing every time. Actually it doesn’t ask anything, just looks like waiting for 10 or more seconds and after that loads. If we start from shortcut made by installation it runs at once.

    Do you know anything about this kind of issues?

    Best regards
    Goran

    • robindotnet Says:

      Where are you getting the URL, and what does it point to? You should only use the shortcut created for you by ClickOnce, or it’s not going to work right. This could be causing your problem.

      If that’s not the issue, and you think the app is loading slower then before, try running fiddler to see what’s going on. It could be an issue with your network.

  23. mzafirovic Says:

    Hi Robin

    Thank you for your answer. Some guys from our support examined the case. As far as I know, the problem was with some certificates. Actually Win7 was trying to check them from net on loading app. Since access was blocked (deliberately limited) due security requirements, it took to long to the system to fall back and use local certificates. I think that guys solved the problem with new security policies.

    Regards
    Goran

  24. jon morgan Says:

    Hi Robin

    I hit a Security issue which makes VS 2017 unusable with ClickOnce. I reported the issue to MS last June here:

    https://developercommunity.visualstudio.com/content/problem/84107/clickonce-security-debugging.html

    but all that happened was that the issue status changed to Under Investigation.

    A possible workaround for solutions with multiple project starts is described here:

    https://stackoverflow.com/questions/44821734/vs-2017-the-security-debugging-option-is-set-but-it-requires-the-visual-studio

    Unfortunately the workaround doesn’t help in single project startup situations.

    It’s unlikely MS will restore the security debugging component just to keep ClickOnce users happy. Do you know of any alternative workaround that will work for single startup project solutions ?

    Thanks !

    Jon

    • robindotnet Says:

      Jon,
      I work for Microsoft now, and I’m trying to track down the PM for ClickOnce. Can you send an e-mail to me — robin dot shahan at microsoft dot com — with this info in it, and I will track it down and try to get you an answer.
      Thanks,
      Robin

    • robindotnet Says:

      Hi Jon, I’m not sure where you sent that e-mail from, but it came in with some funky outlook address with a big GUID-looking field in it, and Microsoft’s servers can’t resolve the address. Do you want to just try sending me a ‘normal’ e-mail without forwarding the info in your comment?
      Robin

  25. Gerrat Says:

    Hi Robin,

    We run a ClickOnce application that runs in a small window. It is launched from a .bat file, and a dozen instances are started up (with different parameters for each, and a different placement on the screen – think tiles).

    We’ve had to add pauses between each instance because otherwise we get a message: “Too many deployed activations are attempting to load at once”. All the pauses greatly slow the startup time of this down.

    Is there a setting somewhere (maybe in the registry) where we can tell Windows to ignore this, or set the limit higher. This is a real pain.

    Thanks,
    Gerrat

    • robindotnet Says:

      There’s no setting that I know of. Each time you activate the application through the shortcut, it checks the origin to see if the files need to be updated, so you’re doing this a bunch of times all at once, and that’s what is causing your problem. Have you considered having a c# app that runs each one of the instances by acting on the exe file of the click once deployment? It would make sure you only check for updates once, you could pass in parameters on the command line, and activate it as many times as you need. E-mail me at robin dot shahan at microsoft dot com if you want to discuss further.

Leave a reply to robindotnet Cancel reply