How to check name of Domino Server to which lotus notes is configured? using C#
- by Preeti
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