fast report causing access denied error in mvc .net

edited June 2020 in FastReport .NET

I created a web application that includes fast report for creating report.

If I run application on my device, everything is alright. But if I upload my project to the host and a user clicks on the Generate report button for the first time, the following error is shown:


 However, if the user refreshes the page or presses the Back button and then clicks the Generate report button again, everything is alright. So this error only appears for the first time the page loaded. I didn't use the path from above in my code at all.

Can anyone help me to solve this error? I have no Idea where this error come from

Comments

  • Hello!

    In Application_Start / Startup, specify a dedicated folder with write permissions: FastReport.Utils.Config.TempFolder = Server.MapPath(“~/App_Data/FastReportTemp”); and Config.WebMode = true;, making sure that the AppPool account (IIS_IUSRS / ApplicationPoolIdentity) has Modify/Write permissions for this folder.

    If the application is running on a restricted shared hosting environment (Medium Trust), make sure it does not attempt to write to C:\Windows\Temp or Program Files

This discussion has been closed.