且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HTTP错误500.30-ASP.NET Core 2.2中的ANCM进程内启动失败错误

更新时间:2023-02-16 14:07:16

我明白了原因.可能是您在应用程序中两次注册了Identity,如下所示:

I got the reason. May be you are registering Identity twice in your application as follows:

启动类的ConfigureServices方法之一:

services.AddDefaultIdentity<IdentityUser>()
                .AddDefaultUI(UIFramework.Bootstrap4)
                .AddEntityFrameworkStores<ApplicationDbContext>();

以及IdentityHostingStartup中的其他内容:

services.AddDefaultIdentity<IdentityUser>(config =>
                {
                    config.SignIn.RequireConfirmedEmail = true;
                }).AddEntityFrameworkStores<ApplicationDbContext>();

Identity注册在一个位置,即使用ConfigureServices方法还是IdentityHostingStartup.

Register Identity just in one place i.e either in ConfigureServices method or in IdentityHostingStartup.

希望这会对您有所帮助.

Hope this will help you.