I have a web application that has Global_Asax and a custom error page. When a user tries to enter an invalid page that does not exist, Application_Error is triggered in Global_asax and an exception is thrown, which is no exception (you can see the details of the exception below). I do not want to handle this case in global_asax, but rather in IIS. I also tried to enter invalid paths ending in .asp and .html and they work fine (they don't end on global_asax, but on page 404 by default).
I need to know which parameter I need to change from IIS7 Manager.
Any help would be appreciated.
Error - the file '/restricted/ff.aspx' does not exist.
System.Web.HttpException: file 'test.aspx' does not exist. in System.Web.UI.Util.CheckVirtualFileExists (VirtualPath virtualPath) in System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossAppPluentBuildPuildPref.Buildildpuildprebpildbreild , VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) when System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory (VirtualPath virtualPath, HttpConAppPairPathPermand.PermandVathBathPath.Permand.PathAppBath.Permand.PathAppBath.App.Permand.PathApp.Bath Type requiredBaseType, HttpContext Context, Boolean allowCrossApp, Boolean noAssert) in System.Web.UI.PageHandlerFactory.GetHandlerHelper (HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) when System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()