toolbar not showing on fastreport .Net / .net 6

I have managed to get my reports displaying as expected in my web application (asp.net MVC on dot net 6) but the toolbars / Icons do not show. When I inspect the page it shows a url for one of the icon images as

/_fr/resources.getResource?resourceName=reload.svg&contentType=image%2Fsvg%2Bxml

I do not have this folder in my wwwroot, so I am assuming the fastreport library is supposed to do that.

What am I missing?

Comments

  • Hello!

    Without `app.UseFastReport()`, this URL returns a 404 Not Found error, but when the middleware is enabled, it returns a 200 OK.

    What to do in your `Program.cs` (or `Startup.cs`):

    using FastReport.Web;
    
    builder.Services.AddFastReport();
    // ...
    app.UseStaticFiles();
    app.UseRouting();
    app.UseFastReport(); // must be BEFORE UseAuthorisation() and MapControllerRoute()!
    app.UseAuthorisation();
    app.MapControllerRoute(...);
    
This discussion has been closed.