Hi ,
We are using one of the third party tool ( Datawindow.net) in Project ASP.Net with C# . The server (IIS) configured to work in
Medium Trust Security Ploicy .
Changing Trust Level , is following method.
( In %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\Web.Config
to change
<trust level="Full" originUrl="" /> to <trust level="Medium" originUrl="" />
)
In runtime an error occured . Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
How can customise trust level permission .. , U have solution about it pls replay ....
Erro details : Server Error in '/Accounts' Application.
Server Error in '/Accounts' Application.
Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
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:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2737813
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'DataWindowInterop, Version=2.0.6684.0, Culture=neutral, PublicKeyToken=cc0f66dd9541b3da' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +98
[ConfigurationErrorsException: Could not load file or assembly 'DataWindowInterop, Version=2.0.6684.0, Culture=neutral, PublicKeyToken=cc0f66dd9541b3da' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +725
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +297
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +71
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +39
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +203
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +95
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +879
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +198
System.Web.Compilation.BuildManager.CompileCodeDirectories() +368
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +402
[HttpException (0x80004005): Could not load file or assembly 'DataWindowInterop, Version=2.0.6684.0, Culture=neutral, PublicKeyToken=cc0f66dd9541b3da' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +81
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +524
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +27
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +560
[HttpException (0x80004005): Could not load file or assembly 'DataWindowInterop, Version=2.0.6684.0, Culture=neutral, PublicKeyToken=cc0f66dd9541b3da' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +645
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +151
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +314
|
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213