Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports on ASP .Net

Status
Not open for further replies.

jmerencilla

Programmer
Jul 17, 2002
123
SG
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
 
It sounds like a security error.
U probably are trying to reach something located on your D drive.

Try giving the 'List Folder Contents' access to your ASPNET user.
If the error stops, then it means u are using something on the D:\somefolder\somefile.xpto, and the ASPNET user doesn't have premission.
If the error changes, then u'll have to find out the exact place where the ASPNET is trying to read or write.
If the error presists, I'll have to keep looking for the solution.

Hope this helps, NetAngel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top