asp.net c# ขึ้นserver แล้วเกิด error ช่วยทีค่ะ เกียวกับไฟล์ crytal report ค่ะ
ดึงข้อมูลมาจากฐานข้อมูลแล้วลงในdataset เพื่อสร้างไฟล์ pdf ค่ะ
Code
Server Error in '/TestReport' Application.
--------------------------------------------------------------------------------
Could not find a part of the path 'c:\inetpub\wwwroot\Gallery\DataFile\Report.pdf'.
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.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\inetpub\wwwroot\Gallery\DataFile\Report.pdf'.
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:
[DirectoryNotFoundException: Could not find a part of the path 'c:\inetpub\wwwroot\Gallery\DataFile\Report.pdf'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +193
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) +1162
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +61
System.IO.FileStream..ctor(String path, FileMode mode) +55
CrystalDecisions.CrystalReports.Engine.FormatEngine.WriteStreamToFile(Stream stream, String filename) +67
CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportStreamToFile(Stream stream, DiskFileDestinationOptions options) +49
CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) +304
CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() +68
CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() +64
testreport._Default.ImpExp() in C:\Documents and Settings\kanokpunb\My Documents\Visual Studio 2008\Projects\testreport\testreport\Default.aspx.cs:680
testreport._Default.btnOk_Click(Object sender, EventArgs e) in C:\Documents and Settings\kanokpunb\My Documents\Visual Studio 2008\Projects\testreport\testreport\Default.aspx.cs:743
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634