Я учусь по коду, написанному на APS.Net Core v1, по настройке сервера идентификации, и я использую v2, включая код QuickStart для Identity Server.
У меня есть индексная страница по умолчанию для настройки Home Controller, которая поставляется с кодом быстрого запуска.
Я считаю, что этот код запускает консоль, но не веб-страницу.
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
var url =
@"C:\Users\xxxx\Documents\Visual Studio 2017\Projects\SIR\SIR.OAUTH\SIR_SSL_Certificate.pfx";
services.AddIdentityServer()
.AddSigningCredential(new X509Certificate2(url, "xxxxxxxx"))
.AddTestUsers(InMemoryConfiguration.Users().ToList())
.AddInMemoryClients(InMemoryConfiguration.Clients())
.AddInMemoryApiResources(InMemoryConfiguration.ApiResources());
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole();
app.UseDeveloperExceptionPage();
app.UseIdentityServer();
app.UseStaticFiles();
app.UseMvcWithDefaultRoute();
}
}
Строка app.UseMvcWithDefaultRoute();
выполнена, но страница индекса не запущена. Что я делаю не так?
РЕДАКТИРОВАТЬ: Это консольный журнал, как было запрошено в комментарии;