Solve.
Change in void Application_Error() in Global.asax.cs
Check type of last server error to HttpRequestValidationException and redirect to CustoErrorPage.html
void Application_Error(object sender, EventArgs e)
{
if (typeof(System.Web.HttpRequestValidationException) == Server.GetLastError().GetType())
{
Response.Redirect("~/HTML/CustomErrorPage.htm");
}
}