IIS 7在尝试生成报告时拒绝访问路径
本文关键字:报告 拒绝访问 路径 IIS | 更新日期: 2023-09-27 18:27:53
我们在尝试生成未访问文件的报告时收到此错误消息。我们正在使用IIS 7。
XXX位于与web服务器不同的服务器上。
2014-10-24 11:04:13,287 [5] ERROR FOUNDATION [(null)] - Access to the path '''XXX 'file2022.pdf' is denied.
System.UnauthorizedAccessException: Access to the path '''XXX'file.pdf' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.WriteStreamToFile(Stream stream, String filename)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportStreamToFile(Stream stream, DiskFileDestinationOptions options)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
at GlobalFunctions.GenerateCrystalReport(String reportFileName, String outputFileName, List`1 params) in C:'NetProjects'branches'R7'GUIs'Foundation'App_Code'GlobalFunctions.vb:line 347
如果您必须访问这样的文件,请确保您的应用程序池以具有该位置读取权限的域用户身份运行。