Access to the path 'C:\Inetpub\wwwroot\rptIssueTools.xml' is denied
Hi All,
I'm using http://aspalliance.com/articleViewer...aId=776&pId=-1 as guide to create a dynamic
dataset bind with crystal report.
It works fine in developing stage but when deploying to user. The report could not open and show the error message Access to the path 'C:\Inetpub\wwwroot\rptIssueTools.xml' is denied..
I had tried the solution given by author side but could not worked.
Anyone has experience on this problem ? can give me some guide ?
Thanks a billion :-)
Re: Access to the path 'C:\Inetpub\wwwroot\rptIssueTools.xml' is denied
The Thing is that you cannot access the Inetpub Folder of the deployment server. One thing you could is that you can create a local folder where your application is deployed.
Use the Server.MapPath(".") to get the current working folder of your application and they you can create the xml file there, you can create another folder inside your working folder
Re: Access to the path 'C:\Inetpub\wwwroot\rptIssueTools.xml' is denied
Can I remove writexml and directly bind with DS ?
I did it by comment writexml method and uncomment
myReportDocument.Database.Tables(TableName).SetDataSource(Ds)
myReportDocument.Database.Tables(0).SetDataSource(Ds)
it worked but I wondered will caused any error ?
vb Code:
Dim myReportDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
myReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
myReportDocument.Load(Server.MapPath(ReportName))
--> myReportDocument.Database.Tables(TableName).SetDataSource(Ds)
--> myReportDocument.Database.Tables(0).SetDataSource(Ds)
myReportDocument.SetDataSource(Ds)
cryrptIssueID.SelectionFormula = Session("SelectionFormula")
cryrptIssueID.ReportSource = myReportDocument
cryrptIssueID.DataBind()
cryrptIssueID.HasCrystalLogo = False
Re: Access to the path 'C:\Inetpub\wwwroot\rptIssueTools.xml' is denied
I don't think this will cause an Error. How do you populate the DS ?