ExecptionMessage:Object reference not set to an instance of an object.
Microsoft.Extensions.Caching.Abstractions
at Microsoft.Extensions.Caching.Memory.CacheExtensions.Get(IMemoryCache cache, Object key)
at Senparc.CO2NET.Cache.LocalObjectCacheStrategy.CheckExisted(String key, Boolean isFullKey)
at Senparc.CO2NET.Cache.LocalObjectCacheStrategy.<>c__DisplayClass19_0.<CheckExistedAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Senparc.CO2NET.Cache.LocalObjectCacheStrategy.CheckExistedAsync(String key, Boolean isFullKey)
at Senparc.NeuChar.Context.GlobalMessageContext`3.GetMessageContextAsync(String userName)
at Senparc.NeuChar.Context.GlobalMessageContext`3.GetMessageContextAsync(String userName, Boolean createIfNotExists)
at Senparc.NeuChar.Context.GlobalMessageContext`3.GetMessageContextAsync(TRequest requestMessage)
at Senparc.NeuChar.MessageHandlers.MessageHandler`3.GetCurrentMessageContext()
at Senparc.NeuChar.MessageHandlers.MessageHandler`3.CheckMessageRepeat()
at Senparc.NeuChar.MessageHandlers.MessageHandler`3.ExecuteAsync(CancellationToken cancellationToken)
at Senparc.NeuChar.MessageHandlers.MessageHandler`3.Execute()
at CemaoDoNetApi.Controllers.Weixin.Work.WorkController.Index(String msg_signature, String timestamp, String nonce) in D:\Work\Source\Repos\CemaoDoNetApi\CemaoDoNetApi\Controllers\Weixin\Work\WorkController.cs:line 102
这是messageHandler.Execute()报的错
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException
HResult=0x80131620
Message=Unexpected end of request content.
Source=Microsoft.AspNetCore.Server.Kestrel.Core
StackTrace:
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelBadHttpRequestException.Throw(RequestRejectionReason reason)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1ContentLengthMessageBody.<ReadAsyncInternal>d__10.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.<ReadAsyncInternal>d__29.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.Read(Span`1 buffer)
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.Read(Span`1 buffer)
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadToEnd()
at Senparc.CO2NET.AspNet.HttpUtility.RequestUtility.GetRequestMemoryStream(HttpRequest request)
at CemaoDoNetApi.Controllers.Weixin.Work.WorkController.Index(String msg_signature, String timestamp, String nonce) in D:\Work\Source\Repos\CemaoDoNetApi\CemaoDoNetApi\Controllers\Weixin\Work\WorkController.cs:line 90
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<<InvokeActionMethodAsync>g__Logged|12_1>d.MoveNext()