Hi Shawn
The DLL needs to be trusted from wherever it is executed i.e. your PC. This is by no means a straight forward subject or one that I have gotten to grips with yet however to at least prove the point you need to create a Runtime Security Policy entry for the code on the machine you are trying to open the document on.
1. Open the Microsoft .NET Framework x.x Configuration tool from the Administrative Tools menu. 2. Under My Computer open the Runtime Security Policy node and navigate down to the All_Code code group beneath User, Code Groups. 3. Add a new Child Code Group and give a pertinant name. 4. Select the URL condition type and enter the URL of the directory holding the VSTO DLL in the URL text box e.g. http://myserver/myvstoapp/* (note the use of the * which means trust anything in this location including anything in sub-folders - alternatively to trust only the specific DLL replace the * with the name of the DLL). 5. Assign the Full Trust permission set and you're done!
Hope this helps to get you started however I would suggest some serious time spent understanding security and code access policy for production conditions, it's an area that I certainly intend to spend a lot of time trying to understand going forwards... |