Outlook Addin fails to load

M

Mo

Hi,
I developed a simple outlok add-in which compiles and ran the first
time I did the debugh through VS2008. After I install the package and
try to COM Add-in within Outlook I get the following error. Does
anybody have any pointers on where ot start debuging this problem?

Could not load file or assembly 'OutllookAddin, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Failed to grant permission to execute. (Exception from HRESULT:
0x80131418)


************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly
'OutllookAddin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. Failed to grant permission to execute.
(Exception from HRESULT: 0x80131418)
File name: 'OutllookAddin, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' ---> System.Security.Policy.PolicyException:
Execution permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline
(Exception e, String basePath, String filePath)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadStartupAssembly
(EntryPoint entryPoint, Dependency dependency, Dictionary`2
assembliesHash)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain
()
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain
(IHostServiceProvider serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper
(IHostServiceProvider serviceProvider)




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
 
S

SvenC

Hi Mo,
I developed a simple outlok add-in which compiles and ran the first
time I did the debugh through VS2008. After I install the package and
try to COM Add-in within Outlook I get the following error. Does
anybody have any pointers on where ot start debuging this problem?

Could not load file or assembly 'OutllookAddin, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Failed to grant permission to execute. (Exception from HRESULT:
0x80131418)

I guess you must give full trust to the assembly or put it in the gac.

Read about using caspol here:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top