cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect: incorrect log on parameters.

former_member1012208
Participant
0 Kudos

In my web page I have the following code to load a crystal report and apply the login details.

It works fine in the development Windows 2003 pc, but when I publish it in a virtual directory on the same pc I get the following error.

MyAppLogon failed. Error in File test_rep {05997100-DCAD-4577-A295-C176916BA981}.rpt: Unable to connect: incorrect log on parameters.

I have another development XP pc with the same setup and everything works fine.

Could any one tell me why it's not working? I am convinced that this is a permission problem on the pc. It seems like the web site cannot find the tnsnames.org file in the oracle directry, even though I have given all users including ast.net access to the folder.

Any help is greatly appreciated. I have VS2005 and Crystal 2008

Following in my code:

myReport = New ReportDocument

myReport.Load(reportPath)

Dim crLogin As New ApplyCRLogin

crLogin._userID = "dwois"

crLogin._passWord = "dwois"

crLogin._serverName = "DW Prod Virtuo"

crLogin.ApplyInfo(myReport)

crLogin = Nothing

Public Class ApplyCRLogin

Public _dbName As String

Public _serverName As String

Public _userID As String

Public _passWord As String

Public _integratedSecurity As Boolean

Public Sub ApplyInfo(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)

Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database()

Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables()

Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table

Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo

Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo

'oCRConnectionInfo.DatabaseName = _dbName

'oCRConnectionInfo.ServerName = _serverName

'oCRConnectionInfo.UserID = _userID

'oCRConnectionInfo.Password = _passWord

oCRConnectionInfo.DatabaseName = _dbName

oCRConnectionInfo.ServerName = _serverName

oCRConnectionInfo.UserID = _userID

oCRConnectionInfo.Password = _passWord

oCRConnectionInfo.IntegratedSecurity = _integratedSecurity

For Each oCRTable In oCRTables

oCRTableLogonInfo = oCRTable.LogOnInfo()

oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo

oCRTable.ApplyLogOnInfo(oCRTableLogonInfo)

If (oCRTable.Location.IndexOf(".")) > 0 Then

oCRTable.Location = oCRTable.Location.Substring(oCRTable.Location.LastIndexOf(".") + 1)

Else

oCRTable.Location = oCRTable.Location

End If

Next

oCRTables(0).TestConnectivity()

End Sub

End Class

Edited by: Don Perera on Jul 17, 2009 9:30 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Don,

See if this [1215646 - Err Msg: "Unable to connect - Invalid log on parameters" or "Load report failed" |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]

BusinessObjects note helps you.

Regards,

Shweta

Answers (1)

Answers (1)

former_member208657
Active Contributor
0 Kudos

You mentioned the ASP.NET account but what about the Network Service account? In Windows 2003 the w3wp.exe is run under the Network Service credentials by default.

I suggest using [Process Monitor|http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx] to see if you can identify the cause of the failures.