1
votes

we write our first outlook addin with vsto (visual studio tools for office).

It works on my PC. On other PCs we get a security exception in the installation process (german):

System.Security.SecurityException: enutzerdefinierte Funktionen können in dieser Anwendung nicht verwendet werden, weil das Zertifikat, mit dem das Bereitstellungsmanifest für Foobar.OutlookAddin signiert wurde, oder sein Speicherort nicht vertrauenswürdig sind. Wenden Sie sich an den Administrator, um weitere Unterstützung zu erhalten.

bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)

bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)

bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.ProcessSHA2Manifest(ActivationContext context, DeploymentSignatureInformation signatureInformation, PermissionSet permissionsRequested, Uri manifest, ManifestSignatureInformationCollection signatures, AddInInstallationStatus installState, TrustStatus sha256TrustStatus, X509Certificate2 sha256PublisherCert)

bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)

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

Die Zone der Assembly, bei der ein Fehler aufgetreten ist:

MyComputer

Anybody knows what´s the problem and how i prevent it?

I think it´s a topic with the certification process. Actual we haven´t a own certificate. But when we buy it, our problem will solved?

2
What is that long first exception message in English?Alex K.
corresponding: "The deployment manifest or the install location is not trustable"John Doe

2 Answers

3
votes

Ensure that the ClickOnce trust prompt is enabled for the zone from which you are trying to load the customization. Navigate to the below registry key and ensure that the PromptingLevel is set to Enabled for the zone from where you are trying to load the customization.

On 32 bit machines:

HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT.NETFramework\Security\TrustManager\PromptingLevel

On 64 bit machines:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MICROSOFT.NETFramework\Security\TrustManager\PromptingLevel

For more information, visit How to: Configure Inclusion List Security.

If you are installing the customization from a web site, then make sure that the site is added to the trusted sites.

You may find the following links helpful:

0
votes

In fact, your add-in doesn't be registered in the computer deployed. When you deploy your VSTO in the different computers, you should insert some keys in the Windows Registry with the Admin right.

For example, if your computer is x64 bit, you can insert (ideally with the location of the VSTO in disk C:)

  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins\your-addin-name]

    "Description"="your-addin-name" 
    "FriendlyName"="your-addin-name"
    "Manifest"="C:\\Program Files (x86)\\Microsoft
     Office\\Outlook\\Addins\\your-addin-name\\your-addin-name.vsto|vstolocal"
    "LoadBehavior"=dword:00000003

It works for my add-in deployed in 500 computers x64 bit with a self certificate