c# 4.0 - How to catch HttpRequestValidationException -
how can redirect user custom error page, when httprequestvalidationexception occurred. tried catch in basecontroller :
protected override void onexception(exceptioncontext exceptioncontext)     {       if (exceptioncontext.exception httprequestvalidationexception)         {           this.view("customerror").executeresult(this.controllercontext);         }     }   but still exception : potentially dangerous request.form value detected client
this exception occurs earlier in execution of request , cannot handled onexceptionmethod in base controller. write global exception handler showed in this post.
Comments
Post a Comment