Setup deployement problem

Add-in Express™ Support Service
That's what is more important than anything else

Setup deployement problem
 
Pierre-D. Savard




Posts: 41
Joined: 2007-03-23
Hi, I need help!

I follow this tutorial:
http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx
and this:
http://msdn2.microsoft.com/en-us/library/aa537179(office.11).aspx

To create a correct Setup program with prerequises and CAS security.

All the installation work good, not error. But the plugin appear in outlook but not loaded. The plugin could not be loader becaus a Com exception.

After several hours lost in test, I found that a simple projet with a messagebox in the ThisAddin_Start work good. But When th ADXModule load or another custom module a made that use Office.Interop.Outlook.DLL the program do not load in outlook anymore. I am pretty sure that the problem are located in the CAS security, but I try severl thing witout any success.

Th program work verry good on the developpement computer in Visualstudio (F5) or on the developpement computer after running the setup created with the setup projet. But on the client computer nothing work if I try to use the Interop.Outlook.Dll.

All the PIA, VSTO SE runtime, NET2.0 are intalled.

I use a SetSecurity Projet provided in the walktrough in the link I posted.

Please help, I need this projet to run...
I send a copy of my projet in the support email.
Thanks in advance.
Posted 24 May, 2007 21:15:36 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Pierre.

You need to grant Full Trust for AddinExpress.VSTO.dll assembly in the .NET v2.0 Configuration wizard (or using the caspol.exe utility) or
just place the assembly into the GAC.


P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found
Posted 25 May, 2007 10:04:35 Top
Pierre-D. Savard




Posts: 41
Joined: 2007-03-23
ok, but the SetSecurity Projet are not supposed to add trust to all the target directory?

I need to add trust for:
- AddinExpress.OL.VSTO.2005.dll
- AddinExpress.ToolbarControls.VSTO.2005.dll
- AddinExpress.VSTO.dll
- My plugin DLL

and all other DLL in my projet? I was thinkin that the setup projet aleready do this job.

Question, How I can view the trust on a .Net windows XP workstation with .NET 2.0 installed but no .net manager in the administrative tool folders?
Posted 25 May, 2007 12:27:46 Top
Pierre-D. Savard




Posts: 41
Joined: 2007-03-23
OK I add all the 3 AddinExpress dll in the GAC with the setup program but now, my plugin load a little more but i got this error from AddinExpress:

Detailed technical information follows:
---
(Inner Exception)
(Inner Exception)
Date and Time: 2007-05-25 17:27:30
Machine Name: JEUX
IP Address: 192.168.0.111
Current User: JEUX\admin

Application Domain: CRMFuzion.dll.manifest
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.VSTO/3.4.2495.0__2b3662baf831494c/AddinExpress.VSTO.dll
Assembly Full Name: AddinExpress.VSTO, Version=3.4.2495.0, Culture=neutral, PublicKeyToken=2b3662baf831494c
Assembly Version: 3.4.2495.0
Assembly Build Date: 2007-05-25 17:26:31

Exception Source: mscorlib
Exception Type: System.Security.Policy.PolicyException
Exception Message: Execution permission cannot be acquired.
Exception Target Site: ResolvePolicy

---- Stack Trace ----
System.Security.SecurityManager.ResolvePolicy(evidence As Evidence, reqdPset As PermissionSet, optPset As PermissionSet, denyPset As PermissionSet, denied As PermissionSet&, checkExecutionPermission As Boolean)
AddinExpress.VSTO.dll: N 0208 (0xD0) IL
System.Security.SecurityManager.ResolvePolicy(evidence As Evidence, reqdPset As PermissionSet, optPset As PermissionSet, denyPset As PermissionSet, denied As PermissionSet&, securitySpecialFlags As Int32&, checkExecutionPermission As Boolean)
AddinExpress.VSTO.dll: N 0005 (0x5) IL



(Outer Exception)
Date and Time: 2007-05-25 17:27:31
Machine Name: JEUX
IP Address: 192.168.0.111
Current User: JEUX\admin

Application Domain: CRMFuzion.dll.manifest
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.VSTO/3.4.2495.0__2b3662baf831494c/AddinExpress.VSTO.dll
Assembly Full Name: AddinExpress.VSTO, Version=3.4.2495.0, Culture=neutral, PublicKeyToken=2b3662baf831494c
Assembly Version: 3.4.2495.0
Assembly Build Date: 2007-05-25 17:26:31

Exception Source: CRMFuzion
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'AddinExpress.OL.VSTO.2005, Version=3.4.906.2005, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
Exception Target Site: InitializeComponent

---- Stack Trace ----
CRMFuzion.ADXModule1.InitializeComponent()
AddinExpress.VSTO.dll: N 00000 (0x0) JIT
CRMFuzion.ADXModule1..ctor(Application As Object)
AddinExpress.VSTO.dll: N 0088 (0x58) IL



(Outer Exception)
Date and Time: 2007-05-25 17:27:31
Machine Name: JEUX
IP Address: 192.168.0.111
Current User: JEUX\admin

Application Domain: CRMFuzion.dll.manifest
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.VSTO/3.4.2495.0__2b3662baf831494c/AddinExpress.VSTO.dll
Assembly Full Name: AddinExpress.VSTO, Version=3.4.2495.0, Culture=neutral, PublicKeyToken=2b3662baf831494c
Assembly Version: 3.4.2495.0
Assembly Build Date: 2007-05-25 17:26:31

Exception Source: mscorlib
Exception Type: System.Reflection.TargetInvocationException
Exception Message: Exception has been thrown by the target of an invocation.
Exception Target Site: _InvokeConstructor

---- Stack Trace ----
System.RuntimeMethodHandle._InvokeConstructor(args As Object[], signature As SignatureStruct&, declaringType As IntPtr)
AddinExpress.VSTO.dll: N 00000 (0x0) JIT
System.RuntimeMethodHandle.InvokeConstructor(args As Object[], signature As SignatureStruct, declaringType As RuntimeTypeHandle)
AddinExpress.VSTO.dll: N 0000 (0x0) IL
System.Reflection.RuntimeConstructorInfo.Invoke(invokeAttr As BindingFlags, binder As Binder, parameters As Object[], culture As CultureInfo)
AddinExpress.VSTO.dll: N 0234 (0xEA) IL
System.RuntimeType.CreateInstanceImpl(bindingAttr As BindingFlags, binder As Binder, args As Object[], culture As CultureInfo, activationAttributes As Object[])
AddinExpress.VSTO.dll: N 0526 (0x20E) IL
System.Activator.CreateInstance(type As Type, bindingAttr As BindingFlags, binder As Binder, args As Object[], culture As CultureInfo, activationAttributes As Object[])
AddinExpress.VSTO.dll: N 0169 (0xA9) IL
AddinExpress.VSTO.ADXAddinModule.Initialize(vstoApp As Object, moduleType As Type)
AddinExpress.VSTO.dll: N 0018 (0x12) IL
Posted 25 May, 2007 21:05:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Pierre.

If you use Add-Express Extensions for Outlook, you need to grant Full Trust for AddinExpress.Ol.VSTO.2005.dll assembly too.

Please look at the code of the SetSecurity assembly provided by Microsoft:
http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx

You can change the code of the custom actions so that they install all assemblies you need.


Posted 28 May, 2007 09:09:15 Top