locked
Clickonce installation issue (E_ACCESSDENIED) RRS feed

  • Question

  • Hello,
     
    When I try to install my clickonce application on a specific computer, I've got this error. It's slighty different from the issue explain in this post
    and deleting %userprofile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat does not resolve my problem
     
    PLATFORM VERSION INFO
     Windows    : 6.0.6001.65536 (Win32NT)
     Common Language Runtime  : 2.0.50727.4062
     System.Deployment.dll   : 2.0.50727.3053 (netfxsp.050727-3000)
     mscorwks.dll    : 2.0.50727.4062 (QFE.050727-4000)
     dfdll.dll    : 2.0.50727.3053 (netfxsp.050727-3000)
     dfshim.dll    : 2.0.50727.3053 (netfxsp.050727-3000)

    SOURCES
     Deployment url   : http://...
     Application url   : http://...

    IDENTITIES
     Deployment Identity  : BannerZest.application, Version=1.0.0.177, Culture=neutral, PublicKeyToken=bb3fbea2e2302886, processorArchitecture=x86
     Application Identity  : BannerZest.exe, Version=1.0.0.177, Culture=neutral, PublicKeyToken=bb3fbea2e2302886, processorArchitecture=x86, type=win32

    APPLICATION SUMMARY
     * Installable application.

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of http://.../BannerZest.application resulted in exception. Following failure messages were detected:
      + Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [03/02/2010 22:31:37] : Activation of http://.../BannerZest.application has started.
     * [03/02/2010 22:31:37] : Processing of deployment manifest has successfully completed.
     * [03/02/2010 22:31:37] : Installation of the application has started.
     * [03/02/2010 22:31:39] : Processing of application manifest has successfully completed.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [03/02/2010 22:32:32] System.UnauthorizedAccessException
      - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.NativeMethods.IAssemblyCache.QueryAssemblyInfo(Int32 flags, String assemblyName, AssemblyInfoInternal& assemblyInfo)
       at System.Deployment.Application.Win32InterOp.SystemUtils.QueryAssemblyInfo(QueryAssemblyInfoFlags flags, String assemblyName)
       at System.Deployment.Application.PlatformDetector.VerifyGACDependencyWhidbey(ReferenceIdentity refId)
       at System.Deployment.Application.PlatformDetector.VerifyGACDependency(ReferenceIdentity refId, String tempDir)
       at System.Deployment.Application.PlatformDetector.VerifyPlatformDependencies(AssemblyManifest appManifest, Uri deploySupportUri, String tempDir)
       at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
       at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
       at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.

    Thanks,
    Steve
    Friday, April 9, 2010 9:38 AM

Answers

  • So how do you feel about installing .NET 4.0 on this computer? Even just the client framework. You don't need VS2010 or to change the target of your app. The extended logging applies if you just have .NET 4.0 *installed* on the machine, regardless of what version of VS you use to build your app, or what version of .NET your app targets. Pretty cool. Interested? Here's how:

    1. Install .NET 4.0 or the .NET 4.0 Client on the user's machine. (This RTM'd today, and should be available on Microsoft.com).

    2. Open regedit. Go to HKCU\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment.

    3. Right-click on Deployment and add a string value. The name should be "LogFilePath", and the Data should be a string value with the full path and filename of where you want the log. Note -- the user must be able to write to the path you choose w/o admin privs.

    4. Right-click on Deployment and add a new string value  called "LogVerbosityLevel" and set the Data to 1.

    Try to install the product. You should get a big honking log file.

    Note: It *appends* to the log file every time you install or uninstall a ClickOnce application. It doesn't create a new one. So after you're done, I strongly recommend that you go and remove those two values from the registry. Otherwise it will grow like Jack's beanstalk.

    Post the log file here and I'll take a look at it.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Corneflex Thursday, April 22, 2010 9:41 AM
    Tuesday, April 13, 2010 8:52 AM
  • Hi Corneflex,

    From System.UnauthorizedAccessException we can only know there is access problem with the computer. Can you download all the application files from server? Do you use IE to install the application?

    I am not familiar with Apache so I don’t know its access permission rule. Does the antivirus and firewall on the computer break the download process? If you have no problem download all files from server, the only possible reason I can guess is antivirus and firewall. When you run the computer in safe mode, there is no antivirus and firewall service.

    Hope it helps.

    Sincerely,
    Kira Qian
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Corneflex Thursday, April 22, 2010 9:41 AM
    Tuesday, April 13, 2010 9:33 AM

All replies

  • Not to put too fine a point on it, but it sounds like you don't have access to the files on the server. Do you do the server support, or is that another group/person? How do they provide access -- do they restrict access by Windows credentials or something like that?

    Are you including a publish.htm page in your deployment? Can you open and display that?

    What version of .NET are you targeting? Would you be averse to installing .NET 4.0 on the machine and trying again? I ask that because .NET 4.0 has some improvements to the ClickOnce engine that take effect regardless of the version of .NET you are targeting. It also has verbose logging that you can turn on to get more informatino about your deployment. If you're interested, post back and I'll tell you how.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, April 9, 2010 10:54 AM
  • Not to put too fine a point on it, but it sounds like you don't have access to the files on the server. Do you do the server support, or is that another group/person? How do they provide access -- do they restrict access by Windows credentials or something like that?

    Are you including a publish.htm page in your deployment? Can you open and display that?

    What version of .NET are you targeting? Would you be averse to installing .NET 4.0 on the machine and trying again? I ask that because .NET 4.0 has some improvements to the ClickOnce engine that take effect regardless of the version of .NET you are targeting. It also has verbose logging that you can turn on to get more informatino about your deployment. If you're interested, post back and I'll tell you how.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, April 9, 2010 10:54 AM
  • Hello Robin thanks for your anwser.

    First of all, the problem I've encoutered happens only on one machine. Installation works well on all other machines I've tested (around 10)

    To answer to your questions :

    - Our webserver is Apache and  there is no restriction on the server, and there are no windows credentials. I can open the publish.htm file and install the application in many computers apart one

    - the framework that I'm targeting is 3.5 sp1

    To test with .Net 4.0 I need to install visual studio 2010, recompile my project, correct compilation error, It will take me sometimes to do that. But I'm interested to know to get more verbose logging

     

    Friday, April 9, 2010 11:30 AM
  • Hi,

    If you create a different user account (one you know works on another machine) on that one machine and then try to install the application, does it work? If so, then it's a permission problem with the user account. Can you try that?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Tuesday, April 13, 2010 7:33 AM
  • Hi Robin,

    I've created a new user account, and I've the same problem.

    The only thing that work, is when I boot Windows in "Safe Mode". In safe mode installation succeed

    Tuesday, April 13, 2010 7:48 AM
  • So how do you feel about installing .NET 4.0 on this computer? Even just the client framework. You don't need VS2010 or to change the target of your app. The extended logging applies if you just have .NET 4.0 *installed* on the machine, regardless of what version of VS you use to build your app, or what version of .NET your app targets. Pretty cool. Interested? Here's how:

    1. Install .NET 4.0 or the .NET 4.0 Client on the user's machine. (This RTM'd today, and should be available on Microsoft.com).

    2. Open regedit. Go to HKCU\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment.

    3. Right-click on Deployment and add a string value. The name should be "LogFilePath", and the Data should be a string value with the full path and filename of where you want the log. Note -- the user must be able to write to the path you choose w/o admin privs.

    4. Right-click on Deployment and add a new string value  called "LogVerbosityLevel" and set the Data to 1.

    Try to install the product. You should get a big honking log file.

    Note: It *appends* to the log file every time you install or uninstall a ClickOnce application. It doesn't create a new one. So after you're done, I strongly recommend that you go and remove those two values from the registry. Otherwise it will grow like Jack's beanstalk.

    Post the log file here and I'll take a look at it.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Corneflex Thursday, April 22, 2010 9:41 AM
    Tuesday, April 13, 2010 8:52 AM
  • Hi Corneflex,

    From System.UnauthorizedAccessException we can only know there is access problem with the computer. Can you download all the application files from server? Do you use IE to install the application?

    I am not familiar with Apache so I don’t know its access permission rule. Does the antivirus and firewall on the computer break the download process? If you have no problem download all files from server, the only possible reason I can guess is antivirus and firewall. When you run the computer in safe mode, there is no antivirus and firewall service.

    Hope it helps.

    Sincerely,
    Kira Qian
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Corneflex Thursday, April 22, 2010 9:41 AM
    Tuesday, April 13, 2010 9:33 AM
  • Hello Robin,

    Thank you very much for this tip, It will be very useful to resolved installation issues,

    besides I don't imagine that I just had to install .Net 4.0

    I can test it on Thursday, once it's done, I will return to you.

     

    Thank you,

    Steve

    Tuesday, April 13, 2010 4:06 PM
  • Hello Kira,

    I've disabled the antivirus but not the firewall. I will try to see if it comes from that. like I said to robin I can only test to this computer on thursday.

    Thanks for your help

    Steve

    Tuesday, April 13, 2010 4:12 PM
  • Hi Corneflex,

    How about the issue now?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    Wednesday, April 21, 2010 9:17 AM
  • Hello Kira,

    I'm sorry, but the issue was on the personal pc of a colleague who no longer works for us, so I couldn't go ahead, however I agree with you the problem comes probably from the antivirus or the firewall, so  I've marked your post post as an answer. The post of robin is very usefull so I 've checked it too.

    We are launching our application today, may be this problem will resurface in our customers

    Thank you very much,

      Steve

    Thursday, April 22, 2010 9:41 AM