randy915
asked on
<add assembly="Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
I'm using Visual Studio 2005 and I have a website that is using Microsoft.Office.Interop.W ord assembly. I have added the reference to this assembly in my project but when I browse the website I get following error:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
The page errors out at the following line in the web.config file:
<add assembly="Microsoft.Office .Interop.W ord, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E 9429C"/>
I looked at the assemblies in C:\Windows\Assembly folder. The version in that folder is different than the one in my webconfig file. I tries to change the webconfig file with the version I have in the assembly folder.
-------------------------- ---------- -
So after some searching on EE, someone recommended upgrading Word or Office to 2007. After I installed and reboot, I got this error:
The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityEx ception: That assembly does not allow partially trusted callers.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
BusinessLayer..ctor() +0
What's going on?
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
The page errors out at the following line in the web.config file:
<add assembly="Microsoft.Office
I looked at the assemblies in C:\Windows\Assembly folder. The version in that folder is different than the one in my webconfig file. I tries to change the webconfig file with the version I have in the assembly folder.
--------------------------
So after some searching on EE, someone recommended upgrading Word or Office to 2007. After I installed and reboot, I got this error:
The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityEx
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
BusinessLayer..ctor() +0
What's going on?
ASKER
Does not work. How do you allow partially trusted callers to assemblyinfo.cs?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Do try with impersonated account with more previlage!!
Regards
Renju