Security Exception in OpenXMLSDKv2 RRS feed

  • Question

  • Hi everyone,

    as soon as I updated DocumentFormat.OpenXml.dll  from Open XML SDK 1.0 to Open XML SDK 2.0. in my web-application I start getting this error:

    Security Exception
    Description: 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.SecurityException: That assembly does not allow partially trusted callers.

    My internet provider does not allow "fulltrust", so any ideas concerning a workaround to this issue will be appreciated.
    Tuesday, September 16, 2008 4:40 PM

All replies




    This is interesting... Its not an Open Format XML SDK based exception.

    Please check if there is not yellow exception mark against the reference to DocumentFormat.OpenXml.dll in your referemces list as seen in your Solution Explorer. This sometimes does not give a compile time error.

    To get rid of it, remove the reference and add it again.. and rebuild the solution. May be this will help.



    Tuesday, September 16, 2008 6:33 PM
  • Thanks, nkchennai

    This is a web-application, so I cannot rebuild the project. The point is that the first version of the sdk worked ok. Such exceptions I had in other projects when medium-trust level did not allow calling the native code. Any ideas more?

    Wednesday, October 8, 2008 4:18 PM