Open SokyrkaKyrylo opened 1 month ago
Hi,
Do you have your setup code (Startup.cs
) at hand?
Yep, I have it
ConfigureServices method part:
services.AddNotFoundHandler(o =>
{
var connectionString = Configuration.GetConnectionString(AppSettingsConstants.EpiserverDbKey);
o.UseSqlServer(connectionString);
o.BufferSize = 30;
o.ThreshHold = 5;
o.HandlerMode = FileNotFoundMode.On;
o.IgnoredResourceExtensions = new[] { "jpg", "gif", "png", "css", "js", "ico", "swf", "woff" };
o.Logging = LoggerMode.On;
o.LogWithHostname = false;
});
services.AddOptimizelyNotFoundHandler(o =>
{
o.AutomaticRedirectsEnabled = true;
});
Configure method part:
app.UseStatusCodePagesWithReExecute("/statuscode/{0}");
app.UseNotFoundHandler();
app.UseEndpoints(endpoints =>
{
var openIdOptions = app.ApplicationServices.GetRequiredService<IOptions<AuthenticationOptions>>().Value;
endpoints.MapControllers();
endpoints.ConfigureRoutes(openIdOptions);
endpoints.MapContent();
endpoints.MapRazorPages();
});
Since my last issue report I have made some more investigation and now I`m stuck with the next error:
-- The resource cannot be found 404 () Can u please advise what can I do to resolve this one?