WorkSite SDK - [NRTSession ][TrustedLogin ]Cannot request exclusive semaphores at interrupt time

2.7k Views Asked by At

I am trying to use Autonomy SDK to do some admin operation, But when i try to connect to database i keep getting an exception:

[NRTSession ][TrustedLogin ]Cannot request exclusive semaphores at interrupt time.

My code is in C#

    admin.INRTDMS dms = new admin.NRTDMS();
    //INRTSessions sessions = dms.Sessions;
    admin.INRTSession session = dms.Sessions.Add("TestServer");
    session.TrustedLogin();

Any help is really appreciable.

1

There are 1 best solutions below

0
moraisandre On

Check if the user that you are using to connect is enabled in DbAdmin.

Also, you can try this:

public void ConnectToDbAdmin(string server, string user, string pass)
{
    NRTDMS nrtDMS = new NRTDMS();
    NRTSession nrtSession;
    NRTSessions nrtSessions;

    nrtSessions = nrtDMS.Sessions;
    nrtSessions.Add(server);
    nrtSession = nrtSessions.Item(1);

    nrtSession.Login(user, pass);
    //or
    nrtSession.TrustedLogin();
}