Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iframe not found issue #128

Open
SokyrkaKyrylo opened this issue Aug 2, 2024 · 2 comments
Open

Iframe not found issue #128

SokyrkaKyrylo opened this issue Aug 2, 2024 · 2 comments

Comments

@SokyrkaKyrylo
Copy link

Since my last issue report I have made some more investigation and now I`m stuck with the next error:

<iframe src="/GetaNotFoundHandlerAdmin" width="100%" height="500" style="border:none;" onload="resizeIframe(this)" title="NotFound handler"></iframe> -- The resource cannot be found 404 ()

Can u please advise what can I do to resolve this one?

@valdisiljuconoks
Copy link
Member

Hi,

Do you have your setup code (Startup.cs) at hand?

@wakedupblessed
Copy link

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();
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants