How to check name of Domino Server to which lotus notes is configured? using C#
        Posted  
        
            by Preeti
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Preeti
        
        
        
        Published on 2009-09-23T14:46:41Z
        Indexed on 
            2010/03/13
            10:05 UTC
        
        
        Read the original article
        Hit count: 464
        
Hi,
I am trying to login Domino server. For that i am taking Lotus Notes Password and Domino Server Name from user.
if (notesPassword == "" && serverName == "")
{
MessageBox.Show("Please enter the server name !! ");
return;
}
else
{
   if (connectToDomino(notesPassword, serverName))
   {
      MessageBox.Show("Connection Established Succesfully!!..");
    }
   else
   {
    MessageBox.Show("Connection Fail.Please Login Again To Begin");
   }
}//else
and in
public bool connectToDomino(string NotesPassword, string strDominoServerName)
{
       try
       {
           if (_lotesNotesSession == null)
           {
              NotesSession notesSession = new Domino.NotesSessionClass();
              notesSession.Initialize(NotesPassword);
             }
           return true;
       }
       catch(Exception ex)
       {
           return false;
       }
}
Here i am initializing notes password.So in this case it is just verifying Notes Password. So even if user enters invalid entry of server name above function will return true.
I tried :
string serverName = notesSession.ServerName;
But it is showing null value. :(
Regards,
Preeti
© Stack Overflow or respective owner