About Me
I have over 20 years of experience developing complex, business-critical applications for Fortune 100 companies such as Chevron and AT&T.
I am honored to be 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 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, and I wear many hats, including architecting new features and doing software development. I am fortunate to work with a great team of people.
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 work inbox for approval, so don’t be discouraged if it takes me a couple of days to respond and/or approve your comments.

September 3, 2009 at 11:40 am |
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.
September 5, 2009 at 11:04 am |
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.
February 2, 2010 at 4:22 pm |
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
February 2, 2010 at 4:34 pm |
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
March 2, 2010 at 9:15 am |
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
March 8, 2010 at 1:19 am |
You’re welcome for the help. Are you actually using ClickOnce deployment to deploy your application?
March 7, 2010 at 10:42 pm |
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
March 8, 2010 at 1:20 am |
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).
March 26, 2010 at 7:47 am |
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
March 26, 2010 at 10:43 am |
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.
April 5, 2010 at 11:23 am |
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
April 16, 2010 at 5:32 pm |
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.
June 15, 2010 at 10:29 pm |
i am from bangladesh. i would like to know how third party dll/ocx can deploy in clickonce application at client machine.
June 17, 2010 at 9:30 am |
I think you are the same one who posted this question in the MSDN ClickOnce Forum. I have answered the thread here.
June 21, 2010 at 2:24 pm |
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.
June 21, 2010 at 11:01 pm |
This appears to be a bug in Visual Studio. I’m reporting it (again) to the ClickOnce team.
June 28, 2010 at 3:24 am |
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
July 1, 2010 at 11:40 pm |
Hi, I saw your post in the MSDN ClickOnce Forum, and will answer it there.
July 12, 2010 at 11:45 am |
Thanks for all the useful information you’ve posted in the forums as well as your blog.
July 12, 2010 at 1:34 pm |
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
July 15, 2010 at 2:17 am |
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
August 20, 2010 at 3:33 am |
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
September 3, 2010 at 10:26 am |
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.
September 10, 2010 at 8:28 am |
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.
http://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
September 14, 2010 at 1:13 pm |
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
September 10, 2010 at 8:08 pm |
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
September 14, 2010 at 1:15 pm |
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
September 19, 2010 at 2:28 pm |
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
September 20, 2010 at 2:04 pm |
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
September 20, 2010 at 10:22 pm |
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
October 1, 2010 at 11:21 am |
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
October 1, 2010 at 10:39 am |
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
November 28, 2010 at 2:57 am |
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
October 6, 2010 at 9:50 am |
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
November 28, 2010 at 3:03 am |
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.
November 25, 2010 at 9:51 pm |
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!!
November 28, 2010 at 3:27 am |
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.
December 7, 2010 at 4:07 pm |
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…
January 11, 2011 at 4:33 am |
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.
December 21, 2010 at 12:50 pm |
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!
January 11, 2011 at 5:10 am |
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?
January 11, 2011 at 12:00 pm |
Thanks for your reply Robin. I do not have the code, it is on a file share. GPO stands for Group Policy
January 21, 2011 at 12:48 am |
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
January 10, 2011 at 2:18 pm |
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.
January 21, 2011 at 12:34 am |
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
February 1, 2011 at 4:06 pm |
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
February 6, 2011 at 3:28 pm |
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
February 9, 2011 at 5:08 am |
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
February 13, 2011 at 8:10 pm |
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
March 9, 2011 at 11:34 am |
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
March 23, 2011 at 12:58 am |
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
March 20, 2011 at 11:22 pm |
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.
April 29, 2011 at 3:40 pm |
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!
May 3, 2011 at 9:20 pm |
Will do, thanks.
May 1, 2011 at 6:42 am |
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
May 3, 2011 at 9:36 pm |
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?
May 6, 2011 at 7:18 am |
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
May 24, 2011 at 9:33 pm |
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.
May 23, 2011 at 12:37 pm |
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.
September 7, 2011 at 11:55 pm |
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?
June 6, 2011 at 8:03 am |
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
June 7, 2011 at 11:28 am |
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
June 29, 2011 at 3:13 pm |
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.
September 7, 2011 at 11:52 pm |
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.
July 11, 2011 at 7:10 am |
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.
July 15, 2011 at 12:41 am |
I have responded to your thread in the forum.
Robin
September 16, 2011 at 10:13 am |
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.
October 3, 2011 at 3:04 pm |
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.
October 3, 2011 at 12:10 pm |
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
October 3, 2011 at 2:59 pm |
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.
October 3, 2011 at 1:48 pm |
I had the same problem, and I just needed to generate a test digital signature, and the problem disapered
October 3, 2011 at 3:07 pm |
If you’re referring to the post about the security warning dialog — you have to actually purchase one from Verisign or some other CA in order to change “unknown publisher” to your company name.
October 4, 2011 at 9:06 am |
Yes, but the message with “unknown publisher” no longer appears after I generated a test certificate
October 4, 2011 at 8:10 am |
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
October 18, 2011 at 12:31 pm |
Unfortuantely, you can’t change any of the text in the ClickOnce dialogs.
October 20, 2011 at 10:58 am |
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
October 20, 2011 at 11:36 am |
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!
October 21, 2011 at 6:38 am |
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
October 23, 2011 at 9:08 pm |
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.
December 19, 2011 at 1:18 pm |
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
January 9, 2012 at 12:30 am |
Bing is your friend.
Check this out.
December 21, 2011 at 11:49 pm |
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.
January 9, 2012 at 12:25 am |
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?
February 9, 2012 at 2:06 pm |
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.
February 12, 2012 at 8:44 pm |
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
February 14, 2012 at 2:33 pm |
Thank you Robin for the great explanation! This has fixed my problem.
February 14, 2012 at 2:38 pm |
Great! I’m glad to hear it.
May 1, 2012 at 9:43 pm |
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
May 1, 2012 at 10:31 pm |
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.
May 4, 2012 at 10:07 am |
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.
May 20, 2012 at 11:15 am |
FQDN?
July 16, 2012 at 7:58 am |
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”.
June 6, 2012 at 4:12 pm |
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: 0×80070005 (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: 0×80070005 (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: 0×0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
– HRESULT: 0×0
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.
June 28, 2012 at 1:31 am |
I think you asked this in the MSDN Forum, where I asked if this was your installation 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
Robin
June 14, 2012 at 12:52 am |
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!
June 28, 2012 at 1:27 am |
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
July 5, 2012 at 4:57 am |
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
July 8, 2012 at 7:59 pm |
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
July 9, 2012 at 12:50 am |
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
August 9, 2012 at 11:24 am |
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
October 8, 2012 at 9:37 pm |
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).
September 29, 2012 at 11:11 pm |
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
October 8, 2012 at 9:55 pm |
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.
October 15, 2012 at 11:04 pm |
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
November 8, 2012 at 12:27 pm |
Have you tried enabling the enhanced logging for ClickOnce on the machine? That might provide you with some more information. You can also try creating a new user on the machine, and see if you can install it under that account. If you can, then you know it’s a problem with the initial profile.
November 8, 2012 at 12:34 pm |
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
March 3, 2013 at 6:37 am |
Robin – what’s the RSS feed URL for your blog? I’d love to add it to my flipboard.
Thanks!
Mark
April 6, 2013 at 5:16 pm |
It’s on the bottom of every page. http://robindotnet.wordpress.com/feed
March 6, 2013 at 4:12 pm |
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
March 7, 2013 at 12:18 pm |
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
March 7, 2013 at 2:41 pm |
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
April 6, 2013 at 5:12 pm |
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.
March 27, 2013 at 2:04 am |
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
April 26, 2013 at 7:13 am |
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
April 29, 2013 at 9:51 am |
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
May 17, 2013 at 8:02 am |
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