问题
In my current project I'm using AspNet.Mvc 5.2.7 and Owin 4.1.0
My issue is that whenever I try to access to the Owin Context from a put request (i.e.:HttpContextBase.GetOwinContext()
) I get the error message:
No owin.Environment item was found in the context.
All's good with [HttpPost]
and [HttpGet]
but not with Put so looks like Identity has been introduced properly.
As soon as I changed the very same request to post it started working as well. Went through a lot of SO posts but didn't found anything related which makes me wonder if it's only me who try to do this? Or am I missed something in Identity docs which says that owin context wont be applied with put requests?
来源:https://stackoverflow.com/questions/60264523/no-owin-environment-with-put-requests