CrystalReports, Login Failed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to use Crystal Reports in my asp.net application. I get this error:
###
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
###

I have read this solution and then I applied solution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;319264
But I still get logon exception.

Is there any other solution?

My Code:
##############################################
RL.ReportFiles.Test002 crReportDocument = new RL.ReportFiles.Test002();

TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();

//Crystal Report Properties
CrystalDecisions.CrystalReports.Engine.Database crDatabase;
CrystalDecisions.CrystalReports.Engine.Tables crTables;

crConnectionInfo.ServerName = "SAKBULAK";
crConnectionInfo.DatabaseName = "BIZDESKDB";
crConnectionInfo.UserID = "BIZDESK_login";
crConnectionInfo.Password = "bizsengokdesk";
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

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

reportViewer.ReportSource = crReportDocument;
##############################################
 
Hi Senol,

Welcome to ASPNET newsgroup.
Looking at the natural of the error you encountered, seems a authentication
security issue. Is the SQLServer you are connecting to using Integrated
authentication or mixed mode? If possible you can turn on the SqlProfiler
on the SQLdb server to see whether there occurs authentication fail message
in the profile log. If occur, that means this is a security authentication
problem. Also, I suggest you try test from a simple report first , that'll
help make the problem more convenient to isolate.

In addition, I've found some similiar issue in the public group and some
others also provide some info:

http://www.vbcity.com/forums/faq.asp?fid=15&cat=Crystal Reports

If you still have no luck on this, I recommend that you try contacting the
CR support guys or newsgroup for some further assistance since this is a
common issue, there may have more sophisticated TS means on this.

#How To Get Help with Crystal Reports - International and U.S.
http://support.microsoft.com/default.aspx?id=100368

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi Steven,

My DB is on SQL Server. I used profiler and I saw "login failed" audit on
profiler log. And I see also that although I write this code:
#########
crConnectionInfo.UserID = "MYUSER";
crConnectionInfo.Password = "MYPASSWORD";
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
#########
it seems LoginUser is "NT AUTHORITY\NETWORK SERVICE". I dont want to use
integrated security. But it tries to login with integrated security.
 
Thanks for your reply Senol,

Not sure what the Crystal Report has done internally on the authentication,
curently what we can check is the SQLServer db's authenticaiton mode, is
it configured as Integrated windows only or mixed mode? If it has already
set as integrated windows only, I'm afraid there must have something in CR
need to configure to use SQLServer authentcation mode. I think you can
contact the CR support guys to see whether they've addressed such problem.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Thank you Seteven.

With your help, I relized that I must use mixed mode when I create new
report. I did a successful test.

Thank you again. Have a nice day.
 

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

Back
Top