logon failed on bundled crystal report with ASP.NET

B

bonita

I come across the error
"CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed."
After I move my asp.net code from the development platform (XP
professional) to the production web server (windows 2003 server) by
generating the msi file from the setup and deployment project and
adding the merge modules. The msi file is installed to the windows 2003
server. The installation unzips all the files to the windows 2003
server. After moving to the new web server, I come across the logon
exception problem. Both my development sever and production server
access the same remote SQL server. Both severs do not have crystal
report installed because all the necessary files are contained in the
..dll that was installed by the .msi generated from the setup and
deployment project.
The logon is not due to the problem of the code because I have already
added the login information for every table as follows, and it works
for my development server.

public class maincharge : System.Web.UI.Page
{
protected CrystalDecisions.Web.CrystalReportViewer
CrystalReportViewer1;
mainchargeCR crReportDocument = new mainchargeCR();
mainchargemonCR crReportDocument2 = new mainchargemonCR();
TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
CrystalDecisions.CrystalReports.Engine.Database crDatabase;
CrystalDecisions.CrystalReports.Engine.Tables crTables;
CrystalDecisions.CrystalReports.Engine.Database crDatabase2;
CrystalDecisions.CrystalReports.Engine.Tables crTables2;
......
private void Page_Load(object sender, System.EventArgs e)
{
string connectionString =
ConfigurationSettings.AppSettings["connString"];
crConnectionInfo.ServerName =
ConfigurationSettings.AppSettings["server"];
crConnectionInfo.DatabaseName =
ConfigurationSettings.AppSettings["database"];
crConnectionInfo.UserID =
ConfigurationSettings.AppSettings["userid"];
crConnectionInfo.Password =
ConfigurationSettings.AppSettings["password"];

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in
crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
if (!Page.IsPostBack)
{
}
}
}

Anyone knows if there is and "logon failed" problem with Windows 2003
server accessing a remote database from crystal report?

Thanks a lot for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top