469,140 Members | 1,158 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

logon failed on bundled crystal report with ASP.NET

I come across the error
"CrystalDecisions.CrystalReports.Engine.LogOnExcep tion: 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.Tab le 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.

Feb 20 '06 #1
0 1438

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ambika Srinivasan | last post: by
1 post views Thread by Bob Skutnick | last post: by
4 posts views Thread by Rey | last post: by
2 posts views Thread by Karun Karunakaran | last post: by
3 posts views Thread by Milan Todorovic | last post: by
9 posts views Thread by mollyf | last post: by
19 posts views Thread by Michael O'Donnell | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.