locked
Network Deployment of Excel 2007 WorkBook RRS feed

  • Question

  • Hi, I have a an excel workbook created with Visual Studio 2008 SP1 ( .NET Version : 3.5 SP1, OS: XP x64).  I just followed the steps found on http://msdn.microsoft.com/en-us/library/cc616991(office.12).aspx#VSTO3Solutions2_DownloadSamplesProvidedwiththisArticle . I stoped right before Deploying to the ClickOnce Cache !

    So, in my solution I have the excel workbook with his valid certificate, the project DocumentManifestCustomActions with the ChangeManifestInstaller.cs and the setup. Everything is find, no building error and no error during the installation.

    Please note that the certificate is in Truted Root Certificates as well in the Trusted Publisher in Excel trusted publisher.

    When I move the  file :   workbook.xlsx   anywhere in my local drive, Excel opens it without any problem.  But when I copy this file on a Network share, Excel Throws me this error :

    Customization does not have the permissions required to create an application domain.
    ************** Exception Text **************
    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization does not have the permissions required to create an application domain. ---> System.Security.SecurityException: Customized functionality in this program will not work because the location of ExcelWorkBook1.xlsx is not in the Office Trusted Locations list, or all trusted locations are disabled. Contact your administrator for further assistance.
       at Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifyDocumentIsTrusted(String documentFullLocation, String documentName)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String documentFullLocation, String documentName, String assemblyLocation, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)
    The Zone of the assembly that failed was:
    MyComputer
       --- End of inner exception stack trace ---
    ************** Loaded Assemblies **************  ...... I did't pasted all the loaded assemblies ......

    The only way to solve the issue is to put the entire network share in the Trusted Location in Excel.  It then works OK but this is really not the way to get to work.

    Is ther any other way to solve Excel security requirements ? The file will be move on different location in this network drive and also on other network drive!  It is unrealistic to have our entire network share system in the "Thrusted Locations".

    Or if  you know a better method to deploy VSTO Workbook and template on a network, your solution would be appreciated.

    Thanks

    Friday, July 30, 2010 9:21 PM

Answers

  • hi LamonJunior,

    this part of the security is not related to VSTO: this is an Excel security requirement. Each network location that an Excel workbook is opened from must be trusted. the local computer (minus any temp directories like the IE cache or c:\temp) is automatically considered trusted. 

    there are tools to make it easier to add locations to the Trusted Locations. see http://msdn.microsoft.com/en-us/library/bb772072.aspx for more information.

    m.

    • Marked as answer by Ji.Zhou Monday, August 23, 2010 3:24 AM
    Tuesday, August 3, 2010 11:58 PM

All replies

  • hi LamonJunior,

    this part of the security is not related to VSTO: this is an Excel security requirement. Each network location that an Excel workbook is opened from must be trusted. the local computer (minus any temp directories like the IE cache or c:\temp) is automatically considered trusted. 

    there are tools to make it easier to add locations to the Trusted Locations. see http://msdn.microsoft.com/en-us/library/bb772072.aspx for more information.

    m.

    • Marked as answer by Ji.Zhou Monday, August 23, 2010 3:24 AM
    Tuesday, August 3, 2010 11:58 PM
  • Hi LamonJunior,

    How is this issue going on in your side? Have you solved the problem?

    Best Regards,
    Amy Li
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, August 6, 2010 3:26 AM