Multiterm parallel connections problem

Hi,

I think I have found a possible bug in the MT api: we are building a multiuser application that may connect to Multiterm with several different user accounts at once. This works if the connections succeed, but if a connection fails e.g. because of a wrong username + password, then another already existing connections are broken as well. The sample code I use is this:

---------------------------------------------------------

var app1 = new SDL.Multiterm11.Application();

var repo = app1.ServerRepository;

repo.Location = "http://........";
repo.Connect("<validuser>", "<valid password>");    //SUCCEEDS

try
{
    var app2 = new SDL.Multiterm11.Application();

    var repo2 = app2.ServerRepository;
    repo2.Location = "http://.........";
    repo2.Connect("<invalid>", "<invalid>");    //FAILS
}

catch
{
}

var tb = repo.Termbases.OfType<SDL.Multiterm11.ITermbase>().FirstOrDefault();  //EXCEPTION

---------------------------------------------------------

the first connection succeeds, the second with a brand new Multiterm com object fails because of the wrong credentials. After this, I cannot use the first repository anymore, because I get an exception ("External component has thrown an exception"). If both connections succeed, then I can use both repositories, and I get a different set of termbases.

Can you please help me if there is a workaround or a fix for this (I'm using MT 2014)?

Thanks in advance,

Tamas

  • Hello Tamas,

    An engineer has looked at this and has provided the following answer: "this is due to the fact that there is a single credential store per application. On first connect, using a valid user/password credential, the stored credential is updated for that server address. On second connect, to the same server address, the existing store credentials are updated to use the new provided credentials. Since the new credentials are wrong, any existing connection to that server will throw an exception. So for such cases the Multiterm API was not designed to support this - we will take into consideration this use case for the next release."

    Thanks

    Daniel

    Daniel Brockmann
    Team Trados @ RWS