Page 1 of 1

TM1 .Net API Servers problem

Posted: Tue May 17, 2011 8:00 pm
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.

Re: TM1 .Net API Servers problem

Posted: Wed May 18, 2011 7:18 pm
by bagovino
Are you sure all 3 instances are running on the same admin host? What are the values of strAdminServer and strServerCert?

Re: TM1 .Net API Servers problem

Posted: Wed May 18, 2011 7:37 pm
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.