Every now and then, I’ll find this NRE in our Raygun crash reporting with this stack trace…
Message: [NullReferenceException: Object reference not set to an instance of an object.]
ServiceStack.Host.AspNet.AspNetRequest..ctor(HttpContextBase httpContext, String operationName, RequestAttributes requestAttributes):20
ServiceStack.Mvc.ServiceStackController.get_ServiceStackProvider():28
ServiceStack.Mvc.ServiceStackController.Execute(Object requestDto):0
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState):15
System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult):0
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult):0
System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult):0
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState):0
System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult):0
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute():316
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously):54
I’m not sure what is causing this as it seems random. When I log in as the user and hit the exact same path using the same form parameters, etc, I can’t reproduce it. Any ideas?