私のMVC3アプリケーションは、403、404、および500ステータスコードのカスタムエラーページを表示しますが、trace.axdを参照すると、次のYSODが表示されます。
Server Error in '/' Application.
Trace Error
Description: Trace.axd is not enabled in the configuration file for this application. Note: Trace is never enabled when <deployment retail=true />
Details: To enable trace.axd, please create a <trace> tag within the configuration file located in the root directory of the current web application. This <trace> tag should then have its "enabled" attribute set to "true".
<configuration>
<system.web>
<trace enabled="true"/>
</system.web>
</configuration>
トレースを無効にしましたが、これは良いことですが、サーバーから返された403であるため、500ページが表示されないのはなぜですか?404、403、または500は、醜い黄色の画面でない限り、本当に満足しています。
編集:ローカルホストで実行しているときにYSODと一緒に500を取得していましたが、実際にはサーバー上で403であり、期待していたものに近いですが、カスタムエラーページはありません。これは、サーバー上のわずかに異なる標準エラーページでもあります。
Server Error in '/' Application.
Trace Error
Description: The current trace settings prevent trace.axd from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable trace.axd to be viewable on remote machines, please create a <trace> tag within the configuration file located in the root directory of the current web application. This <trace> tag should then have its "localOnly" attribute set to "false".
<configuration>
<system.web>
<trace localOnly="false"/>
</system.web>
</configuration>