HighTechTalks DotNet Forums  

Documents with customisation attached to emails fail to open with customisation.

Dotnet Security microsoft.public.dotnet.security


Discuss Documents with customisation attached to emails fail to open with customisation. in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Sharat Koya
 
Posts: n/a

Default Documents with customisation attached to emails fail to open with customisation. - 08-29-2007 , 10:58 AM






Hi,

when sending a document with VSTO customisation via email the
recipient recieves the document but they cannot open it directly from
the outlook email by double clicking. The document opens but the
customisation fails and they get the following error message:


System.IO.FileLoadException: Could not load file or assembly
'xxxxxxxxxxxxx, Version=1.6.0.4, Culture=neutral,
PublicKeyToken=xxxxxxxxxxxxxx or one of its dependencies. Failed to
grant permission to execute. (Exception from HRESULT: 0x80131418)
File name: 'xxxxxxxxxxxxxxx, Version=1.6.0.4, Culture=neutral,
PublicKeyToken=xxxxxxxxxxxxxxxxx' --->
System.Security.Policy.PolicyException: Execution permission cannot be
acquired.
at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.HandleOnlineOffline(Excep tion
e, String basePath, String filePath)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.LoadStartupAssembly(Entry Point
entryPoint, Dependency dependency, Dictionary`2 assembliesHash)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.ConfigureAppDomain()
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.LoadAssembliesAndConfigur eAppDomain(IHostServiceProvider
serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.ExecuteCustomization(IHos tServiceProvider
serviceProvider)


If the file is saved to the desktop it works fine.

I have also found that if the following CASPOL lines are executed the
documents launch sucessfully, however, exposing the Internet Zone from
outlook isn't something I want to do. Note that Intranet zone doesn't
work either.

CASPOL -quiet -m -ag Internet_Zone -url "c:\Documents and Settings\*"
CASPOL -quiet -m -ag "App X User Documents" -custom "%ProgramFiles%
\Microsoft Office\Office11\Addins\Msosec.xml" FullTrust -n "AppX
Internet Data Documents" -d "Grants FullTrust to all documents"

Is there any other way to do this?

thanks for any advice,


Sharat Koya


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.