You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
I have a WebAPI project, and sometimes it returns 404. For example, when I make following requests:
GET /api/wallets/my - OK
POST /api/wallets/my/deposits - OK
GET /api/wallets/my - 404
Looks like HTTP method is missing in HttpContext.Request.Method property for last request, which breaks routing:
2018-09-06 19:53:28.565 +03:00 [Information] (Microsoft.AspNetCore.Hosting.Internal.WebHost) Request starting HTTP/1.1 http://localhost:5001/api/wallets/my application/json
2018-09-06 19:53:28.566 +03:00 [Information] (Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler) Successfully validated the token.
2018-09-06 19:53:28.566 +03:00 [Debug] (Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler) AuthenticationScheme: "Bearer" was successfully authenticated.
2018-09-06 19:53:28.567 +03:00 [Debug] (Microsoft.AspNetCore.Builder.RouterMiddleware) Request did not match any routes.
2018-09-06 19:53:28.567 +03:00 [Debug] (Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware) "" requests are not supported
2018-09-06 19:53:28.567 +03:00 [Debug] (Microsoft.AspNetCore.Routing.Tree.TreeRouter) Request successfully matched the route with name 'null' and template '"api/Wallets/my"'.
2018-09-06 19:53:28.567 +03:00 [Debug] (Microsoft.AspNetCore.Mvc.Internal.ActionSelector) Action '"Api.Controllers.WalletsController.Get (Api)"' with id '"085a7c14-baab-4f4d-8a40-33ec2d23c10f"' did not match the constraint '"Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint"'
2018-09-06 19:53:28.569 +03:00 [Debug] (Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler) No actions matched the current request. Route values: []
2018-09-06 19:53:28.569 +03:00 [Debug] (Microsoft.AspNetCore.Builder.RouterMiddleware) Request did not match any routes.
2018-09-06 19:53:28.569 +03:00 [Debug] (Microsoft.AspNetCore.Server.Kestrel) Connection id ""0HLGK351866GS"" completed keep alive response.
2018-09-06 19:53:28.570 +03:00 [Information] (Microsoft.AspNetCore.Hosting.Internal.WebHost) Request finished in 4.5ms 404
I am using version 2.1.3 of Microsoft.AspNetCore.App in my project.
I have a WebAPI project, and sometimes it returns 404. For example, when I make following requests:
Looks like HTTP method is missing in
HttpContext.Request.Method
property for last request, which breaks routing:I am using version
2.1.3
ofMicrosoft.AspNetCore.App
in my project.My
dotnet --info
:The text was updated successfully, but these errors were encountered: