Access to the path '\FastReport\' is denied.
I am running FastReport V1.9.1.0 (FastReport.DLL & FastReport.Web.dll). They are both contained within the BIN Directory and IIS_USRS has full control of this file anf the directory.
I keep getting an Access Denied Error which causes the report function to fail. It seems to be happening more frequently and on a random basis.
An error like this:
Access to the path '\FastReport\' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path '\FastReport\' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: Access to the path '\FastReport\' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7719199
System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +7571081
System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) +150
FastReport.Utils.Config.LoadConfig() +113
FastReport.Utils.Config.Init() +55
FastReport.Report..cctor() +5
[TypeInitializationException: The type initializer for 'FastReport.Report' threw an exception.]
FastReport.Report..ctor() +0
FastReport.Web.WebReport.get_Report() +28
FastReport.Web.WebReport.PrepareReport() +193
FastReport.Web.WebReport.OnLoad(EventArgs e) +64
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
It happens on a random basis and the only way I have found to get out of it is to restart IIS which is not ideal. I have checked the access permission on the directory and it looks OK so there must be something else I am not doing. As a secondary issue this then causes an exception on the Server "An unhandled exception ('System.TypeInitializationException') occurred in w3wp.exe [5912].
Help.....
Gus
I keep getting an Access Denied Error which causes the report function to fail. It seems to be happening more frequently and on a random basis.
An error like this:
Access to the path '\FastReport\' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path '\FastReport\' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: Access to the path '\FastReport\' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7719199
System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +7571081
System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) +150
FastReport.Utils.Config.LoadConfig() +113
FastReport.Utils.Config.Init() +55
FastReport.Report..cctor() +5
[TypeInitializationException: The type initializer for 'FastReport.Report' threw an exception.]
FastReport.Report..ctor() +0
FastReport.Web.WebReport.get_Report() +28
FastReport.Web.WebReport.PrepareReport() +193
FastReport.Web.WebReport.OnLoad(EventArgs e) +64
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
It happens on a random basis and the only way I have found to get out of it is to restart IIS which is not ideal. I have checked the access permission on the directory and it looks OK so there must be something else I am not doing. As a secondary issue this then causes an exception on the Server "An unhandled exception ('System.TypeInitializationException') occurred in w3wp.exe [5912].
Help.....
Gus
Comments
This seems to work in some places but still getting errors as above.
Sorry for my ignorance but which Process monitor as I would really like to get to the bottom of this.
Cheers
Gus