13
votes

I have a VSTO addin that I published on a network share. In my company everybody is able to install and update this application from the network share. Outside of the domain I am unable to install this customization. I get following error:

Installation error screenshot

Details:

************** Exception Text **************
System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for flow or its location is not trusted. Contact your administrator for further assistance.
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
The Zone of the assembly that failed was:
MyComputer

I first thought it was a problem with the certificate. So I explicitly installed the certificate on the client machine. That didn't solve it. When I copy the flow directory to let's say my desktop I can install and run the addin without any problem. So it seems the network folder is not a trusted location. I added the path Z:/Software/Flow/ to the trusted locations in Excel options. This path automatically resolved to the full path //server/data/software/flow/. But that doesn't change anything. Anybody seen this before?

3

3 Answers

10
votes

I found the solution. Basically I Defined the network share as a trusted site in the intranet zone.

0
votes

Which path did you add to the Trusted Locations?

If not "Z:\Software\Flow\", did you also check the "Subfolders of this location are also trusted" option?

0
votes

Enable the ClickOnce trust prompt

Enable the trust prompt for a zone when you want end users to be presented with the option of installing and running any ClickOnce application that comes from that zone.

  1. Open the registry editor:

    1. Click Start, and then click Run.

    2. In the Open box, type regedit, and then click OK.

  2. Find the following registry key:

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

    If the key does not exist, create it.

  3. Add the following subkeys as String Value, if they do not already exist, with the associated values shown in the following table.

+---------------------+----------+
| String Value subkey | Value    |
+---------------------+----------+
| Internet            | Enabled  |
+---------------------+----------+
| UntrustedSites      | Disabled |
+---------------------+----------+
| MyComputer          | Enabled  |
+---------------------+----------+
| LocalIntranet       | Enabled  |
+---------------------+----------+
| TrustedSites        | Enabled  |
+---------------------+----------+