iMan COM Exception - Access is denied

Options
Hi there,

I am getting COM exceptions when calling the iManage COM API. For example:

- COMException occurred during search: System.Runtime.InteropServices.COMException (0xC0000005): [NRTSession ][SearchDocuments ]Access is denied.

or

- COMException occurred during search: System.Runtime.InteropServices.COMException (0xC0000005): [NRTDMS ][CreateDateRange ]Access is denied.

It appears that these errors appear randomly. Sometimes the API calls work fine, but sometimes they throw these errors and any further API calls fail.

The code looks something like this:
// Login looks something like this
IManDMS _ManDMS = new ManDMS();
IManSession _ManSession = _ManDMS.Sessions.Add(Configuration.Server);
_ManSession.Login(Configuration.Username, Configuration.Password);
IManDatabase _ManDatabase = _ManSession.Databases.ItemByName(Configuration.Database);

// search code looks something like this
IManProfileSearchParameters searchParameters = _ManDMSSearch.CreateProfileSearchParameters();
IManDateRange dateRange = _ManDMSSearch.CreateDateRange();
dateRange.DateRangeType = imDateRangeType.imAbsoluteDateRangeType;
dateRange.AbsoluteStartDate.Value = start;
dateRange.AbsoluteEndDate.Value = end;
searchParameters.Add(imProfileAttributeID.imProfileEditDate, dateRange.Value);

IManDocuments documents = _ManDatabaseSearch.SearchDocuments(searchParameters, true) as IManDocuments;
for (int i = 1; i <= documents.Count; i++)
{
// process documents
}

I've yet to see login fail, and also note that the search code is in its own thread.

Any help would be much appreciated.

Comments

  • i think error is happening because of some documents, please check whether the user name useed is having complete memeber of NRTGROUP and ADMIN role on specific database
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs