No owin.Environment item was found in the context - only on server

耗尽温柔 提交于 2019-12-18 09:07:22

问题


I'm getting this error: No owin.Environment item was found in the context

I've seen a zillion posts telling me that I need <appSettings> <add key="owin:AppStartup" value="[AssemblyName].Startup, [AssemblyName]" /> </appSettings> but that does nothing for me.

I am running Identity 2.0 and all upgraded OWIN components.

Also, this runs fine locally, but when pushed to my VM, I get this error?

Seems like either a setting is off or something else needs to be installed. WebPI says I have .NET 4.5.1 installed.

Anyone know how to fix this?


回答1:


Bah! The server needed to be rebooted. I wasn't prompted to, so I figured I didn't need to. I did. Have I learned nothing from The IT Crowd!? ;)




回答2:


Do you have a OWIN server loaded into you app? Microsoft.Owin.Host.SystemWeb is the most common (right now):

http://www.nuget.org/packages/Microsoft.Owin.Host.SystemWeb/



来源:https://stackoverflow.com/questions/22650168/no-owin-environment-item-was-found-in-the-context-only-on-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!