突然,我的 ServiceStack MVC 服务应用程序开始出现错误,如下所示:
{"The given key was not present in the dictionary."}
System.Exception {System.Collections.Generic.KeyNotFoundException}
和堆栈跟踪:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at ServiceStack.WebHost.Endpoints.Utils.FilterAttributeCache.GetRequestFilterAttributes(Type requestDtoType) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\Utils\FilterAttributeCache.cs:line 44
at ServiceStack.WebHost.Endpoints.EndpointHost.ApplyRequestFilters(IHttpRequest httpReq, IHttpResponse httpRes, Object requestDto) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\EndpointHost.cs:line 201
at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\RestHandler.cs:line 79
at ServiceStack.WebHost.Endpoints.Support.EndpointHandlerBase.ProcessRequest(HttpContext context) in C:\src\ServiceStack\src\ServiceStack\WebHost.Endpoints\Support\EndpointHandlerBase.cs:line 150
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
我不知道错误或错误是什么。我的应用程序正在运行,但现在无法运行。
知道如何解决这个问题吗?
编辑 1:当我在我的网络浏览器中导航服务 url 时,调试器永远不会到达我的服务类和Run
方法。