c# - Custom ErrorPage is not Working with [HandleError(ExceptionType = typeof(NotImplementedException), View = "CustomErrorView")] -
i trying handle exception in asp.net mvc application using [handleerror]
.
i changed in web config <customerrors mode="on" />
its not working cutom error notimplementedexception
i have kept customerrorview
in shared folder.
please help....
namespace mvcapplicationerrorhandling.controllers { [handleerror(order = 2)] [handleerror(exceptiontype = typeof(notimplementedexception), view = "customerrorview")] public class homecontroller : controller { public actionresult index() { viewbag.message = "welcome asp.net mvc!"; return view(); } public actionresult about() { return view(); } public actionresult throwexception() { throw new applicationexception(); } public actionresult errordemo() { string strtemp; object obj = null; strtemp = obj.tostring(); return view(); } public actionresult thrownotimplemented() { throw new notimplementedexception(); } } }
Comments
Post a Comment