방금 WebAPI 프로젝트에서 AttributeRouting의 최신 버전 (v3.x로)을 업데이트했으며 지금까지 볼 수 없었던 오류가 발생하기 시작했습니다. 통화가 나는 오류 다음과 같이 얻을 API로 구성되어 이제 때마다AttributeRouting WebAPI 오류 발생
:
System.InvalidOperationException: The constraint entry 'inboundHttpMethod' on the route with route template 'my/path' must have a string value or be of a type which implements 'IHttpRouteConstraint'.
at System.Web.Http.Routing.HttpRoute.ProcessConstraint(HttpRequestMessage request, Object constraint, String parameterName, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.ProcessConstraints(HttpRequestMessage request, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)
at AttributeRouting.Web.Http.Framework.HttpAttributeRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)
at System.Web.Http.WebHost.Routing.HttpWebRoute.GetRouteData(HttpContextBase httpContext)
at System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext)
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
at System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
그것은 몇 달 동안 문제없이 노력하고 있어요.
문서 세부 정보가 아니라 사용 방법이 변경되었습니다. 설정 파일이 올바르게 보입니다.
무엇이 잘못 되었나요? 이 사실을보고 한 다른 사람을 찾을 수 없습니다.
아, 재미 있습니다. 정보 주셔서 감사합니다! – Jammer