0
私はカスタムエラーハンドルに関する記事に従おうとしています。コントローラ、ビュー、グローバルファイルをセットアップしました。エラー/ HttpErrorに移動すると、自分のページが表示されます。しかし、私のコントローラの1つの中に新しい例外をスローしようとすると、私のエラーコードのいずれも、どこにでも私をリダイレクトしたりリダイレクトしたりすることはなく、アプリケーションon_errorは起動しません。MVCでのカスタムエラー処理の問題
それはちょうど私にこれを与える:
Error handler test
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.ApplicationException: Error handler test
Source Error:
Line 275: public ActionResult Website(RerModel model) {
Line 276:
Line 277: throw new ApplicationException("Error handler test");
Line 278:
Line 279: var step = "Website";
私は何かが欠けする必要がありますか?
エラービューは、エラーという別のフォルダ内のビューフォルダにあります。私は何とか私のものを起動させるためにこれを使用する必要がありますか?私はちょうど推測する? [HandleError(ExceptionType = typeof(ApplicationException)、View = "エラー")] –