Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Asp.Net & Crystal Report in IIS - Failed to load database information. Error in File rpt Failed to load database information

$
0
0

I have developed application to show Crystal report in Asp.Net application.

For that i have created web form, used CrystalReportViewer control to show report. Thru Stored Procedure i get data into data set and then assign it to ReportDocument object.

ReportDocument rpd = new ReportDocument();
rpd.Load(Server.MapPath(SessionInfo.CurrentReportSettings.ReportName));
rpd.SetDataSource(ds.Tables[0]);
CrystalReportViewer1.ReportSource = rpd;

This is working fine in VisualStudio, and IIS Express, but when i deployed site in IIS, it started giving above error.

I tried to implement below code which was suggested in other sites, but still same issue

foreach (CrystalDecisions.Shared.IConnectionInfo connection in rpd.DataSourceConnections)
{
      connection.SetConnection(serverName, serverName, userid, password);
       connection.SetLogon(userid, password);
}

So seems there is some issue related to permission related to IIS, but where, that is a question.


Technical User


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>