VSTO Excel 2007 addin fails to install from a network share
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:
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?
I found the solution. Basically I Defined the network share as a trusted site in the intranet zone.
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?
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.
To enable the ClickOnce trust prompt by using the registry editorOpen the registry editor:
Click Start, and then click Run.
In the Open box, type
regedit
, and then click OK.
Find the following registry key:
\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT.NETFramework\Security\TrustManager\PromptingLevel
If the key does not exist, create it.
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 |
+---------------------+----------+
精彩评论