我已经上传了我的 WebApplication 。我的应用程序是在 VS2008 中使用 Crystal Reports 2008 sp3。
我已经上传到并行丛服务器上。我已将水晶报表所需的所有 Dll 添加到 Bin 文件夹中。我的报告路径也是正确的。
我收到的错误是
Line 41: ReportDocument myreport = new ReportDocument();
Line 42: string reportPath = Server.MapPath("~/CrystalReport.rpt");
Line 43: myreport.Load(reportPath);
Line 44:
Line 45: myreport.SetDataSource(ds);
[COMException (0x800001fb): Invalid file name.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +356
[CrystalReportsException: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +418
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +895
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84
_Default.CreateReport() in d:\inetpub\vhosts\mydomain.in\subdomains\mysubdomain\httpdocs\Default.aspx.cs:43
_Default.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\mydomain.in\subdomains\mysubdomain\httpdocs\Default.aspx.cs:21
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
我无法找到错误所在。该报告位于根文件夹本身中。那么这有什么问题呢。还有另一个文件夹 aspnet_client。这是我们需要做的吗?
敬请等待回复
同样的问题困扰了我很长一段时间。现在我找到了答案:)
Goto c:\windows\temp
文件夹及其上的properties->security
添加新用户“IIS_IUSRS
“并赋予其完整/读写能力。
它为我解决了问题。
希望它也适合你:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)