Hello Techies--
With an error like: "_message"[NRTSession ][Login ]Logging in as \"mem_admin\" : The semaphore is set and cannot be closed. "
I know that I'm in the thick of things now!;-) Just for the record, I do not have another session to the DMS active before logging into this session.
Have any of you seen this error? If so, all advice will be greatly appreciated!
----------------------------------------------- code snippet-------------------------------------------------------------------------
private string testMethodAdmin()
{
try
{
IMANADMIN.NRTDMS dms = new IMANADMIN.NRTDMSClass();
string serverName = "MDD_SERVER_NAME";
IMANADMIN.NRTSessions allSessions = dms.Sessions;
//NOTE: This code generates a compile error WITHOUT the nulls
// allSessions.Add(serverName);
//Exact ERROR: "C:\development\source\CSharp-Experiments\CMSConversion\Form1.cs(1177):
// No overload for method 'Add' takes '1' arguments"
//Note: Intellisense claims the method is looking for:
// IMANADMIN.NRTSession INRTSessions.Add(string ServerName, object Before, object After)
// Question: What does "object Before and object After" mean in this context? The example given for
// usage is in VB and uses only the ServerName, shown in the line that gets the overload
// complaint.
allSessions.Add(serverName,null,null); // compiles, but...
IMANADMIN.NRTSession adminSession = allSessions.Item(1);
adminSession.Login("NRTadminUser","somepassword");
.
.
.
strResult = "OK";
}
catch (Exception error)
{
Utility.ReportErrors(error);
strResult = "Operation failed";
return strResult;
}
return strResult;
}
Paula DiTallo - Middleware Architect/ .NET Developer
plditallo@metro-design-dev.com