Object reference not set in GetRouteData (System.Web.Routing)

It drives me crazy. I have implemented Web.Routing in a Web Forms application. The application works fine, and then inexplicably (at least at the moment) the following error message appears:

The reference to the object is not set to the instance of the object. in System.Web.Routing.RouteCollection.GetRouteData (HttpContextBase httpContext) in System.Web.Routing.UrlRoutingModule.PostResolveRequestCache (HttpContextBase context) in System.Web.Routing.UrlRoutingColp. EventPolitePreventPreventPreventPreventPreventPreviewModulePode HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () in System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean & completedSynchronously)

This error is intermittent, and no part of the site navigation creates an error.

My interpretation of the error is that the request to the server raises the PostResolveRequestCache event with a zero httpContext, but I'm not sure how this is possible.

The problem is resolved by restarting the application pool.

The application runs on IIS6, because of this I added a wildcard application map to aspnet_isapi.dll with "Verify that the file exists" is not installed. This allows you to use friendly URLs without file extensions, however I am considering changing this as a possible work. The idea of โ€‹โ€‹this is that a request is probably sent to the server, which receives a module, which should not be.

, , - . - , - , , , .

.

+3
3

, .

+1

. . .

+1

, .Net.

Please check my last answer to this similar question

0
source

Source: https://habr.com/ru/post/1708751/


All Articles