나는 ASP.NET MVC 액션 메소드던지는 예외는 ASP.NET MVC에서 내부 예외를 표시
throw new Exception("outer", new SecurityException("inner"));
실제로 죽음의 노란색 화면에 표시되는 오류에 다음 줄을 추가하는 경우 외부 예외에 대한 언급이 전혀없는 내부 SecurityException입니다.
SecurityException
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: inner
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: inner]
이 예상되는 동작입니까?
외부 예외가 어떤 유형인지는 중요하지 않습니다. 다른 SecurityException 인 경우에도 메시지는 절대로 표시되지 않습니다. 기본 SecurityException 오류 메시지는 너무 모호해서 더 이상 구체적인 정보를 추가하고 싶지 않습니다. 원래 SecurityException을 innerException으로 포함시키지 않더라도이 작업은 정상적으로 작동하지만 이상적으로는이 작업을 수행하려고합니다.
일반적으로
이것은 securityexception뿐만 아니라 모든 내부 예외에 해당합니다. –