Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Logging on as Admin
sideline
AM very new to Interwoven / DMS (started monday...)
using c# (2003) and the WorkSite 8 SDK
am trying to log on as an Admin User. found some examples of code here on the forum
but cant get it to compile..
section of code
try
{
IMANADMIN.NRTDMS m_AdminDMS = new IMANADMIN.NRTDMSClass();
IMANADMIN.NRTSession m_adminsession;
IMANADMIN.INRTDatabase2 m_adminDB;
// Add session
m_adminsession = m_AdminDMS.Sessions.Add(sServername) ;
// Attempt login
m_adminsession.Login(sAdminName, sPassword);
// Check for connection before setting workarea
if (m_adminsession.Connected)
{
m_adminDB = (IMANADMIN.INRTDatabase2)m_adminsession.Databases.Item(1);
}
return true;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
Problem line is
m_adminsession = m_AdminDMS.Sessions.Add(sServername)
- cos says that there are no add methods that one take 1 parameter - the only option is (servername, object before,object after)
?? do i have the right version of IMANADMIN
or
?? what are the objects for
or
??
thaks in anticipation
m
Find more posts tagged with
Comments
jny
It's a syntactical problem:
Try this:
// Add session
m_adminsession = m_AdminDMS.Sessions.Add(sServername, null, null) ;
// Or,
object missingType = System.Type.Missing;
m_adminsession = m_AdminDMS.Sessions.Add(sServername, missingType , missingType ) ;
Either way should work.
sideline
works a treat
many thanks