小编gar*_*ord的帖子

使用Owin和Windows身份验证在MVC 5应用程序中添加声明

我正在开发一个mvc 5 Web应用程序,其中的身份验证由owin和表单身份验证实现.

它开箱即用的声明非常好.现在我正在尝试使用Windows身份验证登录系统

public void ConfigureAuth(IAppBuilder app)
{
// Configure the db context and user manager to use a single instance per request
//  app.CreatePerOwinContext(ApplicationDbContext.Create);
//  app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);

// Enable the application to use a cookie to store information for the signed in user
// and to use a cookie to temporarily store information about a user logging in with a third         party login provider
// Configure the sign in cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new …
Run Code Online (Sandbox Code Playgroud)

c# authentication asp.net-mvc asp.net-mvc-4 owin

5
推荐指数
1
解决办法
6085
查看次数

标签 统计

asp.net-mvc ×1

asp.net-mvc-4 ×1

authentication ×1

c# ×1

owin ×1