3 개의 ASP.net MVC 웹 응용 프로그램을 작성했으며 모두 ISP의 공유 호스팅 서버에 배포됩니다.log4net ASP.Net MVC 웹 응용 프로그램의 보안 예외가 발생했습니다.
3 가지 응용 프로그램 모두 구성 및 설정이 매우 유사합니다. 첫 번째 응용 프로그램은 2, 3 번째 서버와 다른 서버에 배포됩니다. 첫 번째 응용 프로그램에서 오류가 발생하지 않습니다. 무작위 :
2 층과 3 응용 프로그램은 다소 다음 에 SecurityException을 뱉어
alt text http://i46.tinypic.com/24p9pac.jpg
예외 텍스트 :
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: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
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: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +99
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
을web.config를 배치하거나 편집 한 후 위의 오류가 발생했습니다. 그러나 후속 페이지를 다시로드 할 때 얻지 못합니다. 2 개의 웹 사이트는 하루 중 나머지 시간 동안 다시 정상이 될 것이지만 다음 날 아침 나는 같은 오류가 다시 발생합니다.
재 컴파일을 강제하는 것으로 가정하는 web.config를 편집 한 후에도 오류가 계속 나타 납니까?
도와주세요. 문제가 뭔지 잘 모르겠습니다. IIS의 보안 설정과 관련이있는 것 같습니다. 오류를주지 않는 첫 번째 웹 응용 프로그램이 완전히 다른 서버에 있다는 점을 제외하고는 세 가지 웹 응용 프로그램이 모두 비슷한 방식으로 설정 및 배포됩니다.
우수한 끝이 발생한 위치를 정확히 디바이스의 소스 예외를 포착, 거기부터 잘못 알아 냈어 신뢰 수준을 보통으로 설정하면 로컬 컴퓨터에서 디버그 할 수 있습니다. 감사! – Adventure