Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASPNET标识应用程序SigninManager将不会解析_C#_Asp.net_Asp.net Identity - Fatal编程技术网

C# ASPNET标识应用程序SigninManager将不会解析

C# ASPNET标识应用程序SigninManager将不会解析,c#,asp.net,asp.net-identity,C#,Asp.net,Asp.net Identity,以下代码给出了错误“错误19无法解析'MyProject.ApplicationSignInManager'的基类或接口,或者该基类或接口无效”。我有所有标识类的自定义版本,其键类型为long,除了signInManager之外,它们都很好 public class ApplicationSignInManager : SignInManager<ApplicationUser, long> { public ApplicationSignInManager(Applicat

以下代码给出了错误“错误19无法解析'MyProject.ApplicationSignInManager'的基类或接口,或者该基类或接口无效”。我有所有标识类的自定义版本,其键类型为long,除了signInManager之外,它们都很好

public class ApplicationSignInManager : SignInManager<ApplicationUser, long>
{
    public ApplicationSignInManager(ApplicationUserManager userManager, IAuthenticationManager authenticationManager)
        : base(userManager, authenticationManager)
    {
    }

    public static ApplicationSignInManager Create(IdentityFactoryOptions<ApplicationSignInManager> options, IOwinContext context)
    {
        var userManager = context.GetUserManager<ApplicationUserManager>();
        return new ApplicationSignInManager(userManager, context.Authentication);
    }
}
公共类应用程序SignInManager:SignInManager
{
公共应用程序签名管理器(ApplicationUserManager用户管理器、IAAuthenticationManager authenticationManager)
:base(userManager、authenticationManager)
{
}
公共静态应用程序SigninManager创建(IdentityFactoryOptions选项,IOwinContext上下文)
{
var userManager=context.GetUserManager();
返回新的ApplicationSignInManager(userManager,context.Authentication);
}
}

在Startup.auth中是否有app.CreatePerOwinContext(ApplicationUserManager.Create)?是的,我尝试过在ApplicationSignInManager中使用和不使用相同的方法