我在ASP.NET MVC 5站点上有以下类:
[assembly: OwinStartup(typeof(MVCSite.Startup))] namespace MVCSite { public partial class Startup { public void Configuration(IAppBuilder application) { application.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,LoginPath = new PathString("/Account/Login") }); application.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); } } }
在Web.Config我有以下:
<add key="owin:AutomaticAppStartup" value="false"/>
我在Startup.Configuration里面有一个断点,但是这不会触发…
任何想法为什么?
解决方法
Install-Package Microsoft.Owin.Host.SystemWeb