Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving trouble with Spring.NET caching
    text
    copied!<p>I have been reading this post to help me get going on my caching and am running into a problem. When I attempt to do a call to the method below I get the following error:</p> <pre><code>"Cannot initialize property or field node 'LocalTariffId' because the specified context is null." </code></pre> <p>I thought the attribute syntax I am using below would use the LocalTariffId property of the result once it returns to cache my data. This error occurs as soon as I attempt to step into the method. It seems to me that it is trying access that property too soon. I must be missing something so any advice you could provide is greatly appreciated!</p> <pre><code>[CacheResult("AspNetCache", "'LocalTariff.Id=' + LocalTariffId", TimeToLive = "00:10:00")] public Domain.LocalTariffs.LocalTariff GetDefault(string agencyCode) </code></pre> <p>I am also getting a weird error after the first error I was hoping somebody could shed some light on. It has to do with log4net at least I think it does. My logging is working so I am not sure what this one is about.</p> <pre><code>IGCSoftware.HHG.Business.LocalTariffsFacade - Exception thrown in GetDefaultLocalTariff;GetDefaultLocalTariff;9c0bb393-369c-4501-a2ce-9325fe525e38;183341 ms &lt;log4net.Error&gt;Exception rendering object type [Spring.Core.NullValueInNestedPathException]&lt;stackTrace&gt;System.BadImageFormatException: The parameters and the signature of the method don't match. at System.Reflection.RuntimeParameterInfo.GetParameters(IRuntimeMethodInfo methodHandle, MemberInfo member, Signature sig, ParameterInfo&amp; returnParameter, Boolean fetchReturnParameter) at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters() at System.Reflection.RuntimeMethodInfo.GetParameters() at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat) at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Exception.GetStackTrace(Boolean needFileInfo) at System.Exception.ToString(Boolean needFileLineInfo) at System.Exception.ToString() at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer) at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)&lt;/stackTrace&gt;&lt;/log4net.Error&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload