© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
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
dotnet new isui
template, and then uncomment few lines which add required services and make use of them (specifically speaking
app.MapRazorPages()
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/
/.well-known/
.

Options tried:
a) Read everything few more times
b) Reorder
AddService
AddService
and
UseService
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();
}
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();
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

API does not store keys from IdentityServer to validate tokens
C#CC# / help
3y ago
❔ Setting work area does not work on windows 10, workarounds?
C#CC# / help
3y ago
IdentityServer antiforgery token bypass
C#CC# / help
4y ago
❔ Why does not my .To string work?
C#CC# / help
3y ago