excel vsto setup: access is denied. RRS feed

  • Question

  • Hello all,

    I publish a VSTO project for excel at server. My develop environment is XP, VS2008,office2007,framework 3.5.

    All users can set up it and work well except one,  he already installed Office 2007, framework 3.5 and Certificate. the following error has occurred  during setup vsto:

    Name: CSEnhance

    From: _file://

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    ************** Exception Text **************

    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)

    at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()

    at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)

    at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)

    at System.Deployment.Application.SubscriptionStore.get_CurrentUser()

    at System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource, Boolean isUpdate, Boolean isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)

    at System.Deployment.Application.InPlaceHostingManager..ctor(Uri deploymentManifest, Boolean launchInHostProcess)

    at Microsoft.VisualStudio.Tools.Applications.Deployment.IPHMProxy..ctor(Uri uri)

    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.get_Proxy()

    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)

    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    I think  his accout right is incorrect cause  the error happened, but his account is member of administrators, i don't know  how config his account rights.

    thanks for any answer.



    • Edited by will.sun Friday, September 9, 2011 2:33 AM
    Friday, September 9, 2011 2:29 AM

All replies


    Hello Will Sun,

    The fact that only one of the end-users reports this problem points to something that to be fixed on that system. The problem could be caused by any of a number of things. Here are some troubleshooting suggestions and other leads that may resolve it. Please let us know which one worked for you, but if none of them does please let us know that, too.

    In one case granting permission to the user on registry key
    resolved the issue.

    In the case above, and several others, get a log of where the error happens during the process of Setup using Procmon. (Process Monitor) To get the log, download and install Procmon log on the problem machine and take Procmon logs while installing the VSTO Add-in. This should show whether the problem is with the registry key or keys. If there is an access denied for one of those you can grant appropriate permissions to that registry key. For more information about using Procmon see the content below:

    1)     Process Monitor for monitoring file I/O, Registry access, Network Access -

    2)     Another tool  is the VSTO Trouble-shooter for verifying pre-requisites. That and other VSTO tools for different purposes are available at

    3)     Articles which list basic troubleshooting steps are :

    Another Forum thread where the issue was the same error you report is

    “Accessing Excel Addin from SoftGrid giving exception : Access is ...”


    In another Forum thread the user reported solving the issue with this post:

    “I have found the solution to the problem.
    Whenever the Addin was being installed on the machine,
    some set of files were sitting in the folder C:\Documents and Settings\user\Application Data\Microsoft ... somewhere in this folder.
    I had to clear this data and also clear all of my temp and softgrid related data.
    And once i have restarted my app, i was able to see the addin.

    When the Addin was installed for the first time it worked fine. But when it was upgraded and installed again, thats when the problem started.
    The reason could be that, when it was installed for the second time, the cache wasn't getting cleared, which created the problem.”

    Another Forum thread where the user had the same problem is this one:

    “VSTO: access denied. [exception from HRESULT: 0x80070005”


    In another case where the design included Web design the same error was resolved according to this post:

    “The cause of the problem in Active Directory environmental rights of local accounts is incorrect.

    Try adding the following line to your web.config file

    <identity impersonate="true" userName="XXXXXXXXX" password="XXXXXX" />

    This line should be added inside the tag <system.web> </system.web>

    username and password can be your login credentials for the system.”


    Repeating my request above, please let us know which one worked for you, but if none of them does please let us know that, too.

    Chris Jensen
    Senior Technical Support Lead

    Tuesday, September 13, 2011 6:16 PM