TM1 .Net API Servers problem

Post Reply
aking
Posts: 32
Joined: Mon Oct 18, 2010 8:45 pm
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: 365

TM1 .Net API Servers problem

Post by aking »

Hey guys,

I'm hoping someone here might have an insight on a weird problem I'm having. I'm using the TM1 C# API (Probably because I'm a masochist) and I'm having a problem getting a server object back from the Admin Server. When I open the admin server in Architect, it tells me there are three servers; for good measure, we'll call them Server1, Server2, and Server3. The three servers are running on the box as services, and everything else seems to be working fine, but this piece of code throws an error about objects being set to null:

Code: Select all

//Connect to Admin Server
TM1AdminServer objAdminServer = new TM1AdminServer(strAdminServer, strServerCert);

//Connect to TM1 Server
TM1Server objServer = objAdminServer.Servers[strTM1Server].Login(strUserName, strPassword); //Error on this line
In the code there, I'm trying to connect to Server2, and after some digging I realized the objAdminServer.Servers only had one server in it, Server1. I tried saving all data and restarting all the services, but to no avail. Was hoping someone's come across something like this before or might have some idea.

Going to try restarting the whole server overnight...see if that does anything.
bagovino
Posts: 26
Joined: Fri Oct 09, 2009 5:54 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: TM1 .Net API Servers problem

Post by bagovino »

Are you sure all 3 instances are running on the same admin host? What are the values of strAdminServer and strServerCert?
aking
Posts: 32
Joined: Mon Oct 18, 2010 8:45 pm
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: 365

Re: TM1 .Net API Servers problem

Post by aking »

Had to port the whole thing into a new project (something I was going to do anyway) and now it all works. Same admin server, same tm1 server.

Just a ghost in the machine.
Post Reply