我试图将asp.net标识添加到我的web应用程序(表单)中,在运行该应用程序时,我遇到了一个错误。我遵循了本教程“将ASP.NET标识添加到一个空的或现有的”,它编译时没有任何错误,但在从
在试图加载应用程序时发生了以下错误。
我创建了Startup.cs类,并将密钥放在appSettings中,如下所示
[assembly: OwinStartup(typeof(IdentiyTeste.Startup))]
namespace IdentiyTeste
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Login")
});
}
}
}和
<add key="owin:appStartup" value="IdentiyTeste.Startup" />我尝试了所有的变化“自己的启动类检测”,但没有成功。
我会把我的.dll列表放在这里,以防万一
http://i58.tinypic.com/2r7lpgg.jpg
我在Startup类中添加了一个断点,但是它从来没有到达那个断点,所以我认为它与启用Owin启动的VS2015配置有关,或者与ISS VS2015内部运行有关,但是我找不到任何有助于跟踪问题的东西。
发布于 2015-09-30 10:50:49
您还需要Microsoft.Owin.Host.SystemWeb包,否则启动就不会被调用
https://stackoverflow.com/questions/32780559
复制相似问题