C#C
C#2y ago
mylaff

[SOLVED] IdentityServer scaffolded UI from quickstart does not seem to work

Currently learning ASP.NET Core ecosystem, and as part of the process, I tried to introduce Duende IdentityServer to the system, according to their quickstart guide. However, on the second tutorial "Interactive applications with ASP.NET Core", I ran into a problem of not being able to add UI (Razor pages driven). Tutorial itself is as plain and simple as run
dotnet new isui
template, and then uncomment few lines which add required services and make use of them (specifically speaking
app.MapRazorPages()
), however, nothing seem to work, as root path
/
returns 404, as every other razor page. IdentityServer itself works though, and serves
/.well-known/
.

Options tried:
a) Read everything few more times
b) Reorder
AddService
and
UseService
few times to no awail (they go in correct order, AFAIK)
c) Ensure pages and other scaffolded template content does exist in the /Pages folder and wwwroot.
d) Rebuild everything few times
e) Follow video-tutorial on Duende YT

Have anyone had something like this?
For context, current HostingExtensions.cs (some parts are ommited for brevity):
public static WebApplication ConfigureServices(this WebApplicationBuilder builder) {
  builder.Services.AddRazorPages();
  builder.Services.AddIdentityServer(options => { ... });
  return builder.Build();
}

public static WebApplication ConfigurePipeline(this WebApplication app) {
  app.UseStaticFiles();
  app.UseRouting();

  app.UseIdentityServer();

  app.UseAuthorization();
  app.MapRazorPages().RequireAuthorization();
}
Was this page helpful?