Skip to Content
author's profile photo Former Member
Former Member

Unable to connect: incorrect log on parameters.

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2009 at 01:55 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2009 at 10:01 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.