dotnetdevcsharp
dotnetdevcsharp

Reputation: 3980

Identity scaffold pages not found at runtime

I scaffold my identity pages so that their appeared in areas/account

enter image description here

/Account/Login

But now when I go to the Account/Login its not found should it not have created a Account controller for me as well ?

My Start-up is told to use identity so don't get it.

 public void ConfigureServices(IServiceCollection services) {
     services.AddDbContext<ApplicationDbContext>(options =>
     options.UseSqlServer(
         Configuration.GetConnectionString("DefaultConnection")));          
         services.AddDefaultIdentity<IdentityUser>(options => 
         options.SignIn.RequireConfirmedAccount = true)
         .AddEntityFrameworkStores<ApplicationDbContext>();          
        services.AddControllersWithViews().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null);
        services.AddRazorPages();
    }

Upvotes: 0

Views: 141

Answers (1)

Roman Marusyk
Roman Marusyk

Reputation: 24569

Use area name in URL

/Identity/Account/Login

should it not have created a Account controller for me as well?

no, because it use Pages

Upvotes: 1

Related Questions