A case where the server security dog ​​caused an ASP.NET website to run incorrectly

  
                  

This article mainly introduces a case where the server security dog ​​causes the ASP.NET website to run incorrectly. Finally, the solution is given. The friends who need it can refer to the keywords in the

dictionary: “RegistryPermission” Added keywords: "RegistryPermission" Error, because the security dog ​​on the server is too harsh on the .net program keyword to give an error.

I encountered an error in .net today. I have never seen such an error before, and I don’t have much detailed information. “/” server error in the application.

Keywords in the dictionary: “RegistryPermission” Added keywords: "RegistryPermission" Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception Details: System.ArgumentException: The item has been added. Keywords in the dictionary: “RegistryPermission” Added keywords: "RegistryPermission"

Source Error:

An unhandled exception was generated during the execution of the current web request. The following exception stack trace information can be used to determine information about the cause of the anomaly and where it occurred. Stack trace:

The code is as follows: [ArgumentException: Item added. Keywords in the dictionary: “RegistryPermission” Added keywords: "RegistryPermission”] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +7482408 System.Collections.Hashtable.Add(Object key , Object value) +11 System.Security.Policy.PolicyLevel.FromXml(SecurityElement e) +307 System.Security.SecurityManager.LoadPolicyLevelFromStringHelper(String str, String path, PolicyLevelType type) +207 System.Security.SecurityManager.LoadPolicyLevelFromString(String str , PolicyLevelType type) +37 System.Web.HttpRuntime.CreatePolicyLevel(String configFile, String appDir, String binDir, String strOriginUrl, Boolean& foundGacToken) +420 System.Web.HttpRuntime.SetTrustLevel(TrustSection trustSection, SecurityPolicySection securityPolicySection) +8913358 System. Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +186 [HttpException (0x80004005): Added item. Keywords in the dictionary: “RegistryPermission” Added keywords: "RegistryPermission”] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8886319 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web .HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259 ---------------------------------------- ---------------------------------------- Version Information: Microsoft .NET Framework Version: 2.0 .50727.3053; ASP.NET version: 2.0.50727.3053

I thought it was a permission or a problem with the dll file. I finally found out that the security dog ​​was installed on the server.

In the security dog There is a configuration panel related to .net, which is changed to full mode, without any permission restrictions, system default level

Copyright © Windows knowledge All Rights Reserved