OwinStartup not firing

https://stackoverflow.com/questions/20203982/owinstartup-not-firing

缺少依赖

Make sure you have installed Microsoft.Owin.Host.SystemWeb package in the project. This package is needed for startup detection in IIS hosted applications. For more information you can refer to this article.

 
Do you have Microsoft.Owin.Host.Systemweb package installed in this application. Make sure this dll is also part of the bin folder?
 

配置问题

 
 

If you've upgraded from an older MVC version make sure you don't have

  <add key="owin:AutomaticAppStartup" value="false" />

in your web.config. It will suppress calling the startup logic.

Instead change it to true

  <add key="owin:AutomaticAppStartup" value="true" />

I realize you already mentioned this but sometimes people (like me) don't read the whole question and just jump to the answers...

Somewhere along the line - when I upgraded to MVC 5 this got added and I never saw it until today.

可以直接删除这个配置
原文地址:https://www.cnblogs.com/chucklu/p/10330236.html