PRB: Errors occur after you change the security policy for a managed code solution (824002)
The information in this article applies to:
- Microsoft Office Word 2003
- Microsoft Office Excel 2003
- Microsoft Visual Studio Tools for the Microsoft Office System version 2003
SYMPTOMSWhen you try to load a managed code extension that was created by using Microsoft Visual Studio Tools for the Microsoft Office System in either Microsoft Office Excel or Microsoft Office Word, you receive the following error message: The current .NET security policy does not permit WordProject1 to run from the folder <FolderName>. Do not change the security policy in your computer. The .NET security policy is controlled by your administrator or the developer who wrote the custom macros. You can still edit and save the document. Contact your administrator or the author of this document for further assistance.
Alternatively, when you try to load a managed smart document solution in either Excel or Word, you receive the following error message: The XML expansion pack or the Smart Document program is missing or invalid. Contact your system administrator or the person who provided this document. CAUSEThis problem occurs because the change to the security policy does not take effect until the application is restarted. Managed code solutions for Excel and Word require that the solution have a code access security policy with full trust granted to the solution. If you have updated a security policy for your solution, and if you have not restarted all Office applications after the update, you may receive one of the errors that is listed in the "Symptoms" section. RESOLUTIONTo resolve this problem, after you change a security policy, quit all Office applications before you load the managed code solution.
Note Make sure that all instances of Excel and Word are not running. To do this, examine the list of processes that are running in Windows Task Manager. If you use Word as your e-mail editor in Outlook, quit all instances of Outlook.STATUS
This behavior is by design.REFERENCESFor additional information, see the following topics in the Visual Studio Tools for Office documentation: - "Troubleshooting in Office at Run Time"
- "Security Requirements to Run Office Solutions"
Modification Type: | Major | Last Reviewed: | 3/23/2006 |
---|
Keywords: | kbOfficeSmartDoc kbnofix KB824002 kbAudDeveloper |
---|
|