The application attempted to perform an operation not allowed by the security policy

Topics: Web Client Software Factory
Jan 12, 2009 at 7:35 PM
Hi,
I have customized the Security module of WCSF.
I have customized the following classes
1. Authorization Module
2. Authorization services

During customization I have used LDAP authentication and DB authorization.
My application is running fine locally from VS 2008.
But whenever I am deploying this application to IIS 6.0 it is giving me the following error.

<title>Security Exception</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style>

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.

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.]
   Wyndham.IRRP.Shell.Security.WyndhamAuthorizationModule.Init(HttpApplication context) +0
   System.Web.HttpApplication.InitModulesCommon() +66
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1006
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +259
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350


Please help. Thanks in advance.



Jan 13, 2009 at 4:48 PM
Edited Jan 13, 2009 at 4:48 PM
There is an application pool for your web site in IIS 6.0. The application pool is running under an identity.
This identity should have enough permissions. Please check it first.

Chester