title: How to check name of Domino Server to which lotus notes is configured? using C#
body: <p>I am trying to login Domino server.
  For that i am taking Lotus Notes Password and Domino Server Name from user.</p>
  
  <p>if (notesPassword == "" &amp;&amp; serverName == "")</p>
  
  <p>{</p>
  
  <p>MessageBox.Show("Please enter the server name !! "); </p>
  
  <p>return;</p>
  
  <p>}</p>
  
  <p>else</p>
  
  <p>{</p>
  
  <pre><code>   if (connectToDomino(notesPassword, serverName))
  
     {
  
        MessageBox.Show("Connection Established Succesfully!!..");
  
      }
  
     else
  
     {
      MessageBox.Show("Connection Fail.Please Login Again To Begin");
  
     }
  </code></pre>
  
  <p>}//else</p>
  
  <p>and in </p>
  
  <p>public bool connectToDomino(string NotesPassword, string strDominoServerName)</p>
  
  <p>{</p>
  
  <pre><code>       try
  
         {
             if (_lotesNotesSession == null)
             {
  
                NotesSession notesSession = new Domino.NotesSessionClass();
  
                notesSession.Initialize(NotesPassword);
  
  
               }
             return true;
         }
         catch(Exception ex)
         {
             return false;
         }
  </code></pre>
  
  <p>}</p>
  
  <p>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.</p>
  
  <p>I tried :</p>
  
  <p>string serverName = notesSession.ServerName;</p>
  
  <p>But it is showing null value. :(</p>