我在本地计算机上运行了一个Identity Server实例,可以使用\ core和\ admin,所有工作都很棒。我现在已将Web应用程序部署到实时环境中,当使用\ core和\ admin时,我只获得404。
当然没有实际要解决的页面,它只是一个已编译的DLL。
我如何让这个在我的实时环境中运行?
我为IdentityServer和MembershipReboot添加了NuGet包
我有以下代码startup.cs
public void Configuration(IAppBuilder app)
{
LogProvider.SetCurrentLogProvider(new DiagnosticsTraceLogProvider());
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Trace()
.CreateLogger();
var connectionString = "MembershipReboot";
app.Map("/admin", adminApp =>
{
var factory = new IdentityManagerServiceFactory();
factory.Configure(connectionString);
adminApp.UseIdentityManager(new IdentityManagerOptions()
{
Factory = factory
});
});
app.Map("/core", core =>
{
var idSvrFactory = Factory.Configure();
idSvrFactory.ConfigureCustomUserService(connectionString);
var options = new IdentityServerOptions
{
SiteName = "IdentityServer3 - UserService-MembershipReboot",
SigningCertificate = Certificate.Get(),
Factory = idSvrFactory,
AuthenticationOptions = new AuthenticationOptions{
IdentityProviders = ConfigureAdditionalIdentityProviders,
}
};
core.UseIdentityServer(options);
});
}
因此,运行https://localhost:9234/Admin将加载MembershipReboot管理页面,并且运行https://localhost:9234/Core将加载IdentityServer Front Page 并且https://localhost:9234/core/.well-known/openid-configuration将加载配置页面,但是当我将其部署到服务器时,我在尝试这些链接时只获得404。
我希望这更有意义