cancel
Showing results for 
Search instead for 
Did you mean: 

Troubleshooting error connecting to the CMC datbase using CrystalEnterpriseLib in VS code

former_member485168
Discoverer
0 Kudos

We have the following code that works perfectly in a VS solution created on the same sever that Crystal Server 2016 is installed:

Dim sql As String = "Select SI_ID From CI_INFOOBJECTS WHERE SI_NAME = '" & ReportName + "'"
Dim retVal As String = vbNull
Dim oSessionMgr As CrystalEnterpriseLib.SessionMgr
oSessionMgr = New CrystalEnterpriseLib.SessionMgr

Dim oEnterpriseSession As CrystalEnterpriseLib.EnterpriseSession
oEnterpriseSession = oSessionMgr.Logon(UserID, Password, "CMCServerName", "secEnterprise")

The problem arise when we try to use the same code in a VS project that is created on a client (developer) computer. We read somewhere on the web that we should use CMCServernName:6400 to connect remotely so we did that and we now get

"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ConsoleApplication3.exe. Additional information: Internal error."

If we use CMCServernName:8080 then we get "An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ConsoleApplication3.exe
Additional information: Unable to log on: Could not connect to server MPREPHCRYSTAL:8080. Please check that the server name is correct, and that the server is running.".

The problems is probably NOT on the code since it work on the server. We are thinking about security/firewall issues but we can connect to the CMC using the url http://CMCServernName:8080/BOE/CMC without problems (in the page that is prompted it shows /CMCServernName:6400 on the system text box).

Any ideas on what to look for? Thaks.

Accepted Solutions (0)

Answers (0)