not allowed to load local resource
I am getting "not allowed to load local resource: (path to fast report file)" error from my web browser when I try to open fast report online designer in my web application. Do you have any idea how can I bypass this problem, without me turning off web browser security?
Here is part of the code in Index method which creates a web report object for displaying designer, setting the URL of the designer and save method:
string webRootPath = _hostingEnvironment.WebRootPath;
WebReport web = new WebReport();
web.Mode = WebReportMode.Designer;
web.Designer.Path = webRootPath + "/WebReportDesigner/index.html";
web.Designer.SaveMethod("~/Home/SaveDesignedReport");
Thank you in advance.
This discussion has been closed.
Comments
Hello!
You need to pass a relative web URL accessible via Static Files from the wwwroot folder:
And don’t forget to include `app.UseStaticFiles();` in `Program.cs`, and place the `WebReportDesigner` folder itself inside `wwwroot`
Test application: https://www.dropbox.com/scl/fi/74anjkrb2m3eeustx81xm/FastReport.Core.Skia.MVC.6.0.%20-Online-Designer-Trial-2.zip?rlkey=jigjg2bil32ce7q6b9h8nxlx1&st=hpqtkheg&dl=0