none
Load at startup fails after deploy of Outlook 2007 Addin - Customization does not have permissions required to create application domain RRS feed

  • Question

  • I am amazed at how difficult it is to deploy an application level addin for Outlook once working on my development PC. I really need some help after many hours chasing this with Bing and Google.

    I used the standard Setup project template with Vstudio 2010. I manually created registry entries for this Outlook Add-In where I'm targeting Office 2007 (Outlook 2007). The resulting SETUP runs without complaints on the target machine which is VISTA. Examining the Registry on the target machine (before attempting to start Outlook2007 and after) shows a hint of the problem. One of these entries - LoadBehavior - keeps changing from the value I set which is 0x00000003 - to a new value of 0x00000002.

    Another registry entry I created - Manifest - is of Type REG-SZ and contains the following data:

    \\HAMMERHEAD\STAFF\Johna\CBMI.Outlook2007AddInV7Setup\Debug\SetupRegistry|vstolocal

    The lowest level folder - SetupRegistry - contains the xxxx.msi file and a setup.exe file built by my SetupProject. NOTE: Besides the project output, I manually added these 2 files:

    • CBMI.Outlook2007AddInV7.dll.manifest
    • CBMI.Outlook2007AddInV7.vsto

     

    Application Event Log shows an EventID: 4096, Source: VSTO 4.0:

    Customization URI: file://hammerhead/STAFF/Johna/CBMI.Outlook2007AddInV7Setup/Debug/
    Exception: 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 application will not work because the administrator has listed file://hammerhead/STAFF/Johna/CBMI.Outlook2007AddInV7Setup/Debug/SetupRegistry as untrusted. Contact your administrator for further assistance.
      at Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifySolutionUri(Uri uri)
      at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.GetAssemblyDataFromManifests(String solutionLocation, String manifestLocator, String documentName, Boolean showUIDuringDeployment, CustomizationType customizationType, OfficeVersion officeVersion, IHostServiceProvider interopServiceProvider)
      at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)
    The Zone of the assembly that failed was:
    MyComputer
      --- End of inner exception stack trace ---
    
    
    ************** Loaded Assemblies **************
    mscorlib
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3619 (GDR.050727-3600)
      CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Office.Runtime.v10.0
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.31007.0
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0.dll
    ----------------------------------------
    System
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
      Assembly Version: 3.5.0.0
      Win32 Version: 3.5.30729.1 built by: SP
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.31007.0
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0.dll
    ----------------------------------------
    System.AddIn
      Assembly Version: 3.5.0.0
      Win32 Version: 3.5.30729.1 built by: SP
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.31007.0
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
      Assembly Version: 9.0.0.0
      Win32 Version: 9.0.30729.4130
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.31007.0
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0.dll
    ----------------------------------------
    
    
    

    The network path where my SETUP and the companion .MSI file reside is \\HAMMERHEAD\STAFF\Johna which I have mapped as the Z: drive. I logon to the target machine with my DOMAINNAME\johna and I am an administrator on the target machine. I can't think of what else to tell to help someone help me.

    Thanks.


    John
    Monday, May 9, 2011 10:51 PM

Answers

  • Thank you for the Ted Pattison piece. It's one of many I have read-over and probably the best. I found the error:

    My entry causing the problem:

    \\HAMMERHEAD\STAFF\Johna\CBMI.Outlook2007AddInV7Setup\Debug\SetupRegistry|vstolocal

    ..I changed to this:

    [TARGETDIR]CBMI.Outlook2007AddInV7.vsto|vstolocal

    Allow me to add a complaint of sorts about some Microsoft documentation that led me astray. This piece:

    Registry Entries for Application-Level Add-Ins

    contains a woefully misleading line item (with no example):

    Manifest

    REG_SZ

    Required. The full path of the deployment manifest for the add-in. The path can be a location on the local computer, a network share (UNC), or a Web server (HTTP).

    If you use Windows Installer to deploy the solution, append the string |vstolocal (that is, the pipe character | followed by vstolocal) to the end of this path. This ensures that your solution is loaded from the installation folder, rather than the ClickOnce cache. For more information, see Deploying an Office Solution by Using Windows Installer.

    There is no mention of [TARGETDIR] in this article.

     


    John
    • Marked as answer by John.J.Adams Wednesday, May 11, 2011 2:03 PM
    Wednesday, May 11, 2011 2:03 PM

All replies

  • Hi John,

    Here are a couple of articles on deploying VSTO solutions I can recommend

    http://msdn.microsoft.com/en-us/library/cc442767.aspx

    http://msdn.microsoft.com/en-us/vsto/ff937654.aspx

    Hope it helps


    Regards, Rich
    Tuesday, May 10, 2011 2:34 AM
  • Thank you for the Ted Pattison piece. It's one of many I have read-over and probably the best. I found the error:

    My entry causing the problem:

    \\HAMMERHEAD\STAFF\Johna\CBMI.Outlook2007AddInV7Setup\Debug\SetupRegistry|vstolocal

    ..I changed to this:

    [TARGETDIR]CBMI.Outlook2007AddInV7.vsto|vstolocal

    Allow me to add a complaint of sorts about some Microsoft documentation that led me astray. This piece:

    Registry Entries for Application-Level Add-Ins

    contains a woefully misleading line item (with no example):

    Manifest

    REG_SZ

    Required. The full path of the deployment manifest for the add-in. The path can be a location on the local computer, a network share (UNC), or a Web server (HTTP).

    If you use Windows Installer to deploy the solution, append the string |vstolocal (that is, the pipe character | followed by vstolocal) to the end of this path. This ensures that your solution is loaded from the installation folder, rather than the ClickOnce cache. For more information, see Deploying an Office Solution by Using Windows Installer.

    There is no mention of [TARGETDIR] in this article.

     


    John
    • Marked as answer by John.J.Adams Wednesday, May 11, 2011 2:03 PM
    Wednesday, May 11, 2011 2:03 PM