【发布时间】:2016-08-15 01:09:50
【问题描述】:
目前我有一个可以完美运行的身份服务器,但我想在其上添加一个 API,以通过 Web 前端进行一些数据库配置更改。文档中的示例展示了如何使用 MVC 而不是 WebAPI。
Startup.Configuration 方法如下所示:
app.UseIdentityServer(new IdentityServerOptions{ ... });
...
app.Map("/api", apiApp =>
{
apiApp.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://localhost:44300", // URL of identity server
});
});
但是,当app.Map 被调用时,它会抛出一个错误,因为它无法到达身份服务器,可能是因为它还没有启动。我怎样才能让他们一起正常工作?
【问题讨论】:
标签: c# asp.net-web-api asp.net-identity identityserver3