Closed YodasMyDad closed 10 years ago
Strange issue, thanks for the stack trace, what version are you using ?
As far as I'm aware the latest version. If I check the properties on the DLL it says product version 1.2.3
I have the exact line code number, I should be able to guess what is null and shouldn't be. Caching should at least not work, not make the app crash.
That would be great. What's the likely timeframe to get this added? I'd like to update it on the site :+1:
Sorry to hassle again. I'm just wondering if this is something I could add in and build locally? As this is happening quite a lot now, I'm concerned I'm going to have to remove it if I can't put in this patch.
Could you try http://www.nuget.org/packages/MvcDonutCaching/1.3.0-beta1 and tell me if this solved the issue ? In that case i'll put that version as stable.
Ok I'll give it a try, but that link says it was last updated on Friday, November 08 2013??
Yeah, quite a lot of work has been done during that period, and external events forced me to put everything on hiatus, I think your bug is already fixed...
Ok no problem :+1: Have just added it and uploaded to the website, I'll let you know if it falls over again. Thanks for the reply.
Hi @moonpyk I'm having a lot of these errors lately, I'm not sure why. I also have multiple subdomains running with a single webapp like the op, so it probably has something to do with that. I'm using the latest stable version (1.2.3) and apparently you already managed to trap the error and invalidate the cache. Can you please release a minor bug fix version (1.2.4) nuget package for this?
Here's the stack trace anyway, in case it may be useful:
Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at DevTrends.MvcDonutCaching.KeyGenerator.GenerateKey(ControllerContext context, CacheSettings cacheSettings)
at DevTrends.MvcDonutCaching.DonutOutputCacheAttribute.ExecuteCallback(ControllerContext context, Boolean hasErrors)
at DevTrends.MvcDonutCaching.DonutOutputCacheAttribute.OnException(ExceptionContext filterContext)
at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thanks
Randomly I got this the error again the other day, it's no where near as frequent as it was (I'm using that 1.3.0beta you linked above). I'm also using this on a single webapp with multiple domains.
@leen3o the rc is out, I brought a few more fixes
@ejjpi you should try the rc
Thanks, I will.
Will try it now thanks. Will let you know if it still happens.
It's still happening even with the RC. I did some digging and I found that all the crashing requests are coming from a crawler bot. As a workaround, I blocked all the specific crawler requests and it solved the problem, but I still have no idea why it's crashing. I had a look at HTTP headers but I didn't see anything fancy, except for some random spam keywords with an url sent in the form.
Here's the elmah error report (I did some obfuscating of sensible data):
<error
application="/LM/W3SVC/20/ROOT"
type="System.NullReferenceException"
message="Object reference not set to an instance of an object."
source="DevTrends.MvcDonutCaching"
detail="System.NullReferenceException: Object reference not set to an instance of an object.
 at DevTrends.MvcDonutCaching.KeyGenerator.GenerateKey(ControllerContext context, CacheSettings cacheSettings)
 at DevTrends.MvcDonutCaching.DonutOutputCacheAttribute.ExecuteCallback(ControllerContext context, Boolean hasErrors)
 at DevTrends.MvcDonutCaching.DonutOutputCacheAttribute.OnException(ExceptionContext filterContext)
 at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
 at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState)
 at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
 at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
 at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState)
 at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
 at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
 at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
 at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
 at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
 at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
 at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
 at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
 at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
 at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
 at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"
time="2014-06-29T15:59:49.5248339Z">
<serverVariables>
<item
name="ALL_HTTP">
<value
string="HTTP_CONNECTION:close
HTTP_CONTENT_LENGTH:182
HTTP_CONTENT_TYPE:application/x-www-form-urlencoded
HTTP_ACCEPT:text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:zh;q=0.9,en;q=0.8
HTTP_HOST:blablabla.com
HTTP_USER_AGENT:Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)
HTTP_REFER:http://blablabla.com/
" />
</item>
<item
name="ALL_RAW">
<value
string="Connection: close
Content-Length: 182
Content-Type: application/x-www-form-urlencoded
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Encoding: gzip, deflate
Accept-Language: zh;q=0.9,en;q=0.8
Host: blablabla.com
User-Agent: Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)
Refer: http://blablabla.com/
" />
</item>
<item
name="APPL_MD_PATH">
<value
string="/LM/W3SVC/20/ROOT" />
</item>
<item
name="AUTH_TYPE">
<value
string="" />
</item>
<item
name="AUTH_USER">
<value
string="" />
</item>
<item
name="AUTH_PASSWORD">
<value
string="" />
</item>
<item
name="LOGON_USER">
<value
string="" />
</item>
<item
name="REMOTE_USER">
<value
string="" />
</item>
<item
name="CERT_COOKIE">
<value
string="" />
</item>
<item
name="CERT_FLAGS">
<value
string="" />
</item>
<item
name="CERT_ISSUER">
<value
string="" />
</item>
<item
name="CERT_KEYSIZE">
<value
string="" />
</item>
<item
name="CERT_SECRETKEYSIZE">
<value
string="" />
</item>
<item
name="CERT_SERIALNUMBER">
<value
string="" />
</item>
<item
name="CERT_SERVER_ISSUER">
<value
string="" />
</item>
<item
name="CERT_SERVER_SUBJECT">
<value
string="" />
</item>
<item
name="CERT_SUBJECT">
<value
string="" />
</item>
<item
name="CONTENT_LENGTH">
<value
string="182" />
</item>
<item
name="CONTENT_TYPE">
<value
string="application/x-www-form-urlencoded" />
</item>
<item
name="GATEWAY_INTERFACE">
<value
string="CGI/1.1" />
</item>
<item
name="HTTPS">
<value
string="off" />
</item>
<item
name="HTTPS_KEYSIZE">
<value
string="" />
</item>
<item
name="HTTPS_SECRETKEYSIZE">
<value
string="" />
</item>
<item
name="HTTPS_SERVER_ISSUER">
<value
string="" />
</item>
<item
name="HTTPS_SERVER_SUBJECT">
<value
string="" />
</item>
<item
name="INSTANCE_ID">
<value
string="20" />
</item>
<item
name="INSTANCE_META_PATH">
<value
string="/LM/W3SVC/20" />
</item>
<item
name="QUERY_STRING">
<value
string="" />
</item>
<item
name="REMOTE_ADDR">
<value
string="183.60.214.59" />
</item>
<item
name="REMOTE_HOST">
<value
string="183.60.214.59" />
</item>
<item
name="REMOTE_PORT">
<value
string="36890" />
</item>
<item
name="REQUEST_METHOD">
<value
string="GET" />
</item>
<item
name="SERVER_NAME">
<value
string="blablabla.com" />
</item>
<item
name="SERVER_PORT">
<value
string="80" />
</item>
<item
name="SERVER_PORT_SECURE">
<value
string="0" />
</item>
<item
name="SERVER_PROTOCOL">
<value
string="HTTP/1.1" />
</item>
<item
name="SERVER_SOFTWARE">
<value
string="Microsoft-IIS/8.0" />
</item>
<item
name="HTTP_CONNECTION">
<value
string="close" />
</item>
<item
name="HTTP_CONTENT_LENGTH">
<value
string="182" />
</item>
<item
name="HTTP_CONTENT_TYPE">
<value
string="application/x-www-form-urlencoded" />
</item>
<item
name="HTTP_ACCEPT">
<value
string="text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1" />
</item>
<item
name="HTTP_ACCEPT_ENCODING">
<value
string="gzip, deflate" />
</item>
<item
name="HTTP_ACCEPT_LANGUAGE">
<value
string="zh;q=0.9,en;q=0.8" />
</item>
<item
name="HTTP_HOST">
<value
string="blablabla.com" />
</item>
<item
name="HTTP_USER_AGENT">
<value
string="Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" />
</item>
<item
name="HTTP_REFER">
<value
string="http://blablabla.com/" />
</item>
</serverVariables>
<form>
<item
name="">
<value
string="some spam keywords with an url" />
</item>
</form>
</error>
Maybe somebody else is able to find what's going on!
Same issue, different line here, probably a duplicate: https://github.com/moonpyk/mvcdonutcaching/issues/26
I am seeing this quite often on one of my sites. Its a multi-store implementation, so multiple stores running on different urls all from a single app.
I get the following error intermittently, from once a day up to 4 or 5?