jmerencilla
Programmer
hi. i made a simple web app with a crystal report file which uses an SQL server stored proc. however, every time i try to load the report i get the error below mentioning an invalid path in my drive D. my asp .net files are all located on c:/inetpub/ folder, none are located on drive D. i tried testing it using a new windows app project and it worked perfectly fine. can somebody outhere help me trace the source of this error? thanks.
here's my code on the Web form:
Protected WithEvents CRptViewer As CrystalDecisions.Web.CrystalReportViewer
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objCRpt As New SampleCRpt()
CRptViewer.ReportSource = objCRpt
End Sub
and here's the error on page load:
Could not find a part of the path "D:\".
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 "D:\".
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 "D:\".]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +482
System.IO.Directory.CreateDirectory(String path) +195
CrystalDecisions.Web.ReportAgentBase.get_ImagePhysicalPath()
CrystalDecisions.Web.ReportAgentBase.p()
CrystalDecisions.Web.ReportAgent.v(Boolean `)
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1470
here's my code on the Web form:
Protected WithEvents CRptViewer As CrystalDecisions.Web.CrystalReportViewer
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objCRpt As New SampleCRpt()
CRptViewer.ReportSource = objCRpt
End Sub
and here's the error on page load:
Could not find a part of the path "D:\".
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 "D:\".
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 "D:\".]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +482
System.IO.Directory.CreateDirectory(String path) +195
CrystalDecisions.Web.ReportAgentBase.get_ImagePhysicalPath()
CrystalDecisions.Web.ReportAgentBase.p()
CrystalDecisions.Web.ReportAgent.v(Boolean `)
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1470