Identity server load balancing fails.is it because my IdentityServer4 implementation does not persist refresh...












0















Identity server load balancing fails.Not working when multiple instances of identity server are launched.With single instance of Identity Server,It is working fine as expected. Is it because my IdentityServer4 implementation does not persist refresh token ?



Initially my identity server had everything in-memory store.now that after the Identity server load balancing failure, tried implementing IPersistantGrantStore and adding AddOperationalStore ,It creates the DB .But nothing gets stored there.Startup.cs is below.Correct me if there is anything wrong.



public void ConfigureServices(IServiceCollection services)
{
ApplicationSettings applicationSettings = Configuration
.GetSection("ApplicationSettings")
.Get<ApplicationSettings>();

DatabaseSettings dbSettings = Configuration
.GetSection("DatabaseSettings")
.Get<DatabaseSettings>() ?? new DatabaseSettings();

LoggingSettings loggingSettings = Configuration
.GetSection("LoggingSettings")
.Get<LoggingSettings>();

var migrationsAssembly = this.GetType().Assembly.GetName().Name;



services.AddMvc();

services.InitialiseDbContext<PersistedGrantDbContext>(dbSettings);

var appSettingsSection = Configuration.GetSection("ApplicationSettings");
var appSettings = appSettingsSection.Get<ApplicationSettings>();

services.Configure<ApplicationSettings>(appSettingsSection);

.
services.AddCors(options =>
{
options.AddPolicy("AllowAllOriginsHeadersAndMethods",
builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
});

var identityServerBuilder = services
.AddIdentityServer(iso =>
{
if (String.IsNullOrEmpty(applicationSettings.PublicOriginUri) == false)
iso.PublicOrigin = applicationSettings.PublicOriginUri;

if (String.IsNullOrEmpty(applicationSettings.IssuerUri) == false)
iso.IssuerUri = applicationSettings.IssuerUri;

if (String.IsNullOrEmpty(applicationSettings.LoginUrl) == false)
iso.UserInteraction.LoginUrl = applicationSettings.LoginUrl;
});

if (CurrentEnvironment.IsDevelopment())
{
identityServerBuilder.AddDeveloperSigningCredential();
}
else
{
identityServerBuilder.AddSigningCredential(new CertificateManager().GetCertificate(applicationSettings.CertificateKey, applicationSettings.CertificatePrivateKey,
applicationSettings.CertificatePassword, string.Empty, string.Empty, applicationSettings.AWSEndPointRegion));
}

// this adds the operational data from DB (codes, tokens, consents)
identityServerBuilder.AddOperationalStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseNpgsql(dbSettings.ConnectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));

// this enables automatic token cleanup. this is optional.
options.EnableTokenCleanup = true;
options.TokenCleanupInterval = 10; // interval in seconds, short for testing
});

services.AddSingleton<IUserFacade, UserFacade>();
services.AddTransient<IProfileService, ProfileService>();
// Setup dependency injection (TODO: Replace the 'InMemoryXxxxx' services with real ones):
services.AddScoped<IConfigurationFacade, InMemoryConfigurationFacade>();
services.AddSingleton<IClientStore, JsonFileClientStore>();
services.AddSingleton<IResourceStore, ResourcesStore>();
services.AddScoped<IHttpContextFacade, HttpContextFacade>();
services.AddScoped<IUserContextFacade, UserContextFacade>();
services.AddSingleton<IRestHelper, RestHelper>();
services.AddTransient<IPersistedGrantStore, PersistedGrantStore>();

services.AddHttpClient();

ServiceProvider serviceProvider = services.BuildServiceProvider();
IConfigurationFacade config = serviceProvider.GetService<IConfigurationFacade>();

services
.AddAuthentication(IdentityServerCookieName)
.AddCookie(IdentityServerCookieName, options =>
{
options.ExpireTimeSpan = config.UserCookieInactiveLife();
});
}


private void InitializeDatabase(IApplicationBuilder app)
{
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
{
serviceScope.ServiceProvider.GetRequiredService<PersistedGrantDbContext>().Database.Migrate();

//TODO-uncomment the below while enabling identityServerBuilder.AddConfigurationStore

//var context = serviceScope.ServiceProvider.GetRequiredService<ConfigurationDbContext>();
//context.Database.Migrate();
}
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
InitializeDatabase(app);

app.UseCors("AllowAllOriginsHeadersAndMethods");

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseIdentityServer();

app.UseStaticFiles();
app.UseMvcWithDefaultRoute();
}


Identity Server Load balancing failure needs to resolved










share|improve this question




















  • 1





    What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

    – Vidmantas Blazevicius
    Jan 19 at 10:56











  • Also you shouldn't need to add IResourceStore either.

    – Vidmantas Blazevicius
    Jan 19 at 12:04











  • @VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

    – user2082630
    Jan 19 at 13:00













  • Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

    – Vidmantas Blazevicius
    Jan 19 at 17:26
















0















Identity server load balancing fails.Not working when multiple instances of identity server are launched.With single instance of Identity Server,It is working fine as expected. Is it because my IdentityServer4 implementation does not persist refresh token ?



Initially my identity server had everything in-memory store.now that after the Identity server load balancing failure, tried implementing IPersistantGrantStore and adding AddOperationalStore ,It creates the DB .But nothing gets stored there.Startup.cs is below.Correct me if there is anything wrong.



public void ConfigureServices(IServiceCollection services)
{
ApplicationSettings applicationSettings = Configuration
.GetSection("ApplicationSettings")
.Get<ApplicationSettings>();

DatabaseSettings dbSettings = Configuration
.GetSection("DatabaseSettings")
.Get<DatabaseSettings>() ?? new DatabaseSettings();

LoggingSettings loggingSettings = Configuration
.GetSection("LoggingSettings")
.Get<LoggingSettings>();

var migrationsAssembly = this.GetType().Assembly.GetName().Name;



services.AddMvc();

services.InitialiseDbContext<PersistedGrantDbContext>(dbSettings);

var appSettingsSection = Configuration.GetSection("ApplicationSettings");
var appSettings = appSettingsSection.Get<ApplicationSettings>();

services.Configure<ApplicationSettings>(appSettingsSection);

.
services.AddCors(options =>
{
options.AddPolicy("AllowAllOriginsHeadersAndMethods",
builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
});

var identityServerBuilder = services
.AddIdentityServer(iso =>
{
if (String.IsNullOrEmpty(applicationSettings.PublicOriginUri) == false)
iso.PublicOrigin = applicationSettings.PublicOriginUri;

if (String.IsNullOrEmpty(applicationSettings.IssuerUri) == false)
iso.IssuerUri = applicationSettings.IssuerUri;

if (String.IsNullOrEmpty(applicationSettings.LoginUrl) == false)
iso.UserInteraction.LoginUrl = applicationSettings.LoginUrl;
});

if (CurrentEnvironment.IsDevelopment())
{
identityServerBuilder.AddDeveloperSigningCredential();
}
else
{
identityServerBuilder.AddSigningCredential(new CertificateManager().GetCertificate(applicationSettings.CertificateKey, applicationSettings.CertificatePrivateKey,
applicationSettings.CertificatePassword, string.Empty, string.Empty, applicationSettings.AWSEndPointRegion));
}

// this adds the operational data from DB (codes, tokens, consents)
identityServerBuilder.AddOperationalStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseNpgsql(dbSettings.ConnectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));

// this enables automatic token cleanup. this is optional.
options.EnableTokenCleanup = true;
options.TokenCleanupInterval = 10; // interval in seconds, short for testing
});

services.AddSingleton<IUserFacade, UserFacade>();
services.AddTransient<IProfileService, ProfileService>();
// Setup dependency injection (TODO: Replace the 'InMemoryXxxxx' services with real ones):
services.AddScoped<IConfigurationFacade, InMemoryConfigurationFacade>();
services.AddSingleton<IClientStore, JsonFileClientStore>();
services.AddSingleton<IResourceStore, ResourcesStore>();
services.AddScoped<IHttpContextFacade, HttpContextFacade>();
services.AddScoped<IUserContextFacade, UserContextFacade>();
services.AddSingleton<IRestHelper, RestHelper>();
services.AddTransient<IPersistedGrantStore, PersistedGrantStore>();

services.AddHttpClient();

ServiceProvider serviceProvider = services.BuildServiceProvider();
IConfigurationFacade config = serviceProvider.GetService<IConfigurationFacade>();

services
.AddAuthentication(IdentityServerCookieName)
.AddCookie(IdentityServerCookieName, options =>
{
options.ExpireTimeSpan = config.UserCookieInactiveLife();
});
}


private void InitializeDatabase(IApplicationBuilder app)
{
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
{
serviceScope.ServiceProvider.GetRequiredService<PersistedGrantDbContext>().Database.Migrate();

//TODO-uncomment the below while enabling identityServerBuilder.AddConfigurationStore

//var context = serviceScope.ServiceProvider.GetRequiredService<ConfigurationDbContext>();
//context.Database.Migrate();
}
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
InitializeDatabase(app);

app.UseCors("AllowAllOriginsHeadersAndMethods");

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseIdentityServer();

app.UseStaticFiles();
app.UseMvcWithDefaultRoute();
}


Identity Server Load balancing failure needs to resolved










share|improve this question




















  • 1





    What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

    – Vidmantas Blazevicius
    Jan 19 at 10:56











  • Also you shouldn't need to add IResourceStore either.

    – Vidmantas Blazevicius
    Jan 19 at 12:04











  • @VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

    – user2082630
    Jan 19 at 13:00













  • Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

    – Vidmantas Blazevicius
    Jan 19 at 17:26














0












0








0








Identity server load balancing fails.Not working when multiple instances of identity server are launched.With single instance of Identity Server,It is working fine as expected. Is it because my IdentityServer4 implementation does not persist refresh token ?



Initially my identity server had everything in-memory store.now that after the Identity server load balancing failure, tried implementing IPersistantGrantStore and adding AddOperationalStore ,It creates the DB .But nothing gets stored there.Startup.cs is below.Correct me if there is anything wrong.



public void ConfigureServices(IServiceCollection services)
{
ApplicationSettings applicationSettings = Configuration
.GetSection("ApplicationSettings")
.Get<ApplicationSettings>();

DatabaseSettings dbSettings = Configuration
.GetSection("DatabaseSettings")
.Get<DatabaseSettings>() ?? new DatabaseSettings();

LoggingSettings loggingSettings = Configuration
.GetSection("LoggingSettings")
.Get<LoggingSettings>();

var migrationsAssembly = this.GetType().Assembly.GetName().Name;



services.AddMvc();

services.InitialiseDbContext<PersistedGrantDbContext>(dbSettings);

var appSettingsSection = Configuration.GetSection("ApplicationSettings");
var appSettings = appSettingsSection.Get<ApplicationSettings>();

services.Configure<ApplicationSettings>(appSettingsSection);

.
services.AddCors(options =>
{
options.AddPolicy("AllowAllOriginsHeadersAndMethods",
builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
});

var identityServerBuilder = services
.AddIdentityServer(iso =>
{
if (String.IsNullOrEmpty(applicationSettings.PublicOriginUri) == false)
iso.PublicOrigin = applicationSettings.PublicOriginUri;

if (String.IsNullOrEmpty(applicationSettings.IssuerUri) == false)
iso.IssuerUri = applicationSettings.IssuerUri;

if (String.IsNullOrEmpty(applicationSettings.LoginUrl) == false)
iso.UserInteraction.LoginUrl = applicationSettings.LoginUrl;
});

if (CurrentEnvironment.IsDevelopment())
{
identityServerBuilder.AddDeveloperSigningCredential();
}
else
{
identityServerBuilder.AddSigningCredential(new CertificateManager().GetCertificate(applicationSettings.CertificateKey, applicationSettings.CertificatePrivateKey,
applicationSettings.CertificatePassword, string.Empty, string.Empty, applicationSettings.AWSEndPointRegion));
}

// this adds the operational data from DB (codes, tokens, consents)
identityServerBuilder.AddOperationalStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseNpgsql(dbSettings.ConnectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));

// this enables automatic token cleanup. this is optional.
options.EnableTokenCleanup = true;
options.TokenCleanupInterval = 10; // interval in seconds, short for testing
});

services.AddSingleton<IUserFacade, UserFacade>();
services.AddTransient<IProfileService, ProfileService>();
// Setup dependency injection (TODO: Replace the 'InMemoryXxxxx' services with real ones):
services.AddScoped<IConfigurationFacade, InMemoryConfigurationFacade>();
services.AddSingleton<IClientStore, JsonFileClientStore>();
services.AddSingleton<IResourceStore, ResourcesStore>();
services.AddScoped<IHttpContextFacade, HttpContextFacade>();
services.AddScoped<IUserContextFacade, UserContextFacade>();
services.AddSingleton<IRestHelper, RestHelper>();
services.AddTransient<IPersistedGrantStore, PersistedGrantStore>();

services.AddHttpClient();

ServiceProvider serviceProvider = services.BuildServiceProvider();
IConfigurationFacade config = serviceProvider.GetService<IConfigurationFacade>();

services
.AddAuthentication(IdentityServerCookieName)
.AddCookie(IdentityServerCookieName, options =>
{
options.ExpireTimeSpan = config.UserCookieInactiveLife();
});
}


private void InitializeDatabase(IApplicationBuilder app)
{
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
{
serviceScope.ServiceProvider.GetRequiredService<PersistedGrantDbContext>().Database.Migrate();

//TODO-uncomment the below while enabling identityServerBuilder.AddConfigurationStore

//var context = serviceScope.ServiceProvider.GetRequiredService<ConfigurationDbContext>();
//context.Database.Migrate();
}
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
InitializeDatabase(app);

app.UseCors("AllowAllOriginsHeadersAndMethods");

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseIdentityServer();

app.UseStaticFiles();
app.UseMvcWithDefaultRoute();
}


Identity Server Load balancing failure needs to resolved










share|improve this question
















Identity server load balancing fails.Not working when multiple instances of identity server are launched.With single instance of Identity Server,It is working fine as expected. Is it because my IdentityServer4 implementation does not persist refresh token ?



Initially my identity server had everything in-memory store.now that after the Identity server load balancing failure, tried implementing IPersistantGrantStore and adding AddOperationalStore ,It creates the DB .But nothing gets stored there.Startup.cs is below.Correct me if there is anything wrong.



public void ConfigureServices(IServiceCollection services)
{
ApplicationSettings applicationSettings = Configuration
.GetSection("ApplicationSettings")
.Get<ApplicationSettings>();

DatabaseSettings dbSettings = Configuration
.GetSection("DatabaseSettings")
.Get<DatabaseSettings>() ?? new DatabaseSettings();

LoggingSettings loggingSettings = Configuration
.GetSection("LoggingSettings")
.Get<LoggingSettings>();

var migrationsAssembly = this.GetType().Assembly.GetName().Name;



services.AddMvc();

services.InitialiseDbContext<PersistedGrantDbContext>(dbSettings);

var appSettingsSection = Configuration.GetSection("ApplicationSettings");
var appSettings = appSettingsSection.Get<ApplicationSettings>();

services.Configure<ApplicationSettings>(appSettingsSection);

.
services.AddCors(options =>
{
options.AddPolicy("AllowAllOriginsHeadersAndMethods",
builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
});

var identityServerBuilder = services
.AddIdentityServer(iso =>
{
if (String.IsNullOrEmpty(applicationSettings.PublicOriginUri) == false)
iso.PublicOrigin = applicationSettings.PublicOriginUri;

if (String.IsNullOrEmpty(applicationSettings.IssuerUri) == false)
iso.IssuerUri = applicationSettings.IssuerUri;

if (String.IsNullOrEmpty(applicationSettings.LoginUrl) == false)
iso.UserInteraction.LoginUrl = applicationSettings.LoginUrl;
});

if (CurrentEnvironment.IsDevelopment())
{
identityServerBuilder.AddDeveloperSigningCredential();
}
else
{
identityServerBuilder.AddSigningCredential(new CertificateManager().GetCertificate(applicationSettings.CertificateKey, applicationSettings.CertificatePrivateKey,
applicationSettings.CertificatePassword, string.Empty, string.Empty, applicationSettings.AWSEndPointRegion));
}

// this adds the operational data from DB (codes, tokens, consents)
identityServerBuilder.AddOperationalStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseNpgsql(dbSettings.ConnectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));

// this enables automatic token cleanup. this is optional.
options.EnableTokenCleanup = true;
options.TokenCleanupInterval = 10; // interval in seconds, short for testing
});

services.AddSingleton<IUserFacade, UserFacade>();
services.AddTransient<IProfileService, ProfileService>();
// Setup dependency injection (TODO: Replace the 'InMemoryXxxxx' services with real ones):
services.AddScoped<IConfigurationFacade, InMemoryConfigurationFacade>();
services.AddSingleton<IClientStore, JsonFileClientStore>();
services.AddSingleton<IResourceStore, ResourcesStore>();
services.AddScoped<IHttpContextFacade, HttpContextFacade>();
services.AddScoped<IUserContextFacade, UserContextFacade>();
services.AddSingleton<IRestHelper, RestHelper>();
services.AddTransient<IPersistedGrantStore, PersistedGrantStore>();

services.AddHttpClient();

ServiceProvider serviceProvider = services.BuildServiceProvider();
IConfigurationFacade config = serviceProvider.GetService<IConfigurationFacade>();

services
.AddAuthentication(IdentityServerCookieName)
.AddCookie(IdentityServerCookieName, options =>
{
options.ExpireTimeSpan = config.UserCookieInactiveLife();
});
}


private void InitializeDatabase(IApplicationBuilder app)
{
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
{
serviceScope.ServiceProvider.GetRequiredService<PersistedGrantDbContext>().Database.Migrate();

//TODO-uncomment the below while enabling identityServerBuilder.AddConfigurationStore

//var context = serviceScope.ServiceProvider.GetRequiredService<ConfigurationDbContext>();
//context.Database.Migrate();
}
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
InitializeDatabase(app);

app.UseCors("AllowAllOriginsHeadersAndMethods");

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseIdentityServer();

app.UseStaticFiles();
app.UseMvcWithDefaultRoute();
}


Identity Server Load balancing failure needs to resolved







angular .net-core identityserver4 asp.net-core-webapi asp-net-core-spa-services






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 13:22







user2082630

















asked Jan 19 at 9:27









user2082630user2082630

79119




79119








  • 1





    What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

    – Vidmantas Blazevicius
    Jan 19 at 10:56











  • Also you shouldn't need to add IResourceStore either.

    – Vidmantas Blazevicius
    Jan 19 at 12:04











  • @VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

    – user2082630
    Jan 19 at 13:00













  • Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

    – Vidmantas Blazevicius
    Jan 19 at 17:26














  • 1





    What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

    – Vidmantas Blazevicius
    Jan 19 at 10:56











  • Also you shouldn't need to add IResourceStore either.

    – Vidmantas Blazevicius
    Jan 19 at 12:04











  • @VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

    – user2082630
    Jan 19 at 13:00













  • Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

    – Vidmantas Blazevicius
    Jan 19 at 17:26








1




1





What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

– Vidmantas Blazevicius
Jan 19 at 10:56





What exactly is not working? And why are you adding IPersistedGrantStore into DI? I think you get that added from AddOperationalStore().

– Vidmantas Blazevicius
Jan 19 at 10:56













Also you shouldn't need to add IResourceStore either.

– Vidmantas Blazevicius
Jan 19 at 12:04





Also you shouldn't need to add IResourceStore either.

– Vidmantas Blazevicius
Jan 19 at 12:04













@VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

– user2082630
Jan 19 at 13:00







@VidmantasBlazevicius ,I had to follow several online articles to get this working. But None helped. PersistedGrantStore into DI is based on this stackoverflow.com/questions/47311011/… .

– user2082630
Jan 19 at 13:00















Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

– Vidmantas Blazevicius
Jan 19 at 17:26





Yeah, I know that article, but you would only need to implement and add those interfaces if you didn't use their library and used your own persistance layer.

– Vidmantas Blazevicius
Jan 19 at 17:26












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265704%2fidentity-server-load-balancing-fails-is-it-because-my-identityserver4-implementa%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54265704%2fidentity-server-load-balancing-fails-is-it-because-my-identityserver4-implementa%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Liquibase includeAll doesn't find base path

How to use setInterval in EJS file?

Petrus Granier-Deferre