My .NET (WPF and C#) application succesfully integrates with a local Lotus Notes client via Interop.Domino. It prompts the user for his Lotus Notes username/password (which are really the windows credentials) and then creates a mail in the user's local Lotus Notes mailbox. I use the code below, and it works fine (the part that creates the email is not included). However, the customer would like it to work automatically, without the user being prompted for his password. The Lotus Notes installation uses Windows credentials, but my application does not. Users are not prompted for password when they manually open their Lotus Notes, so I figure it should be possible.
How can I open a session with Notes and tell it to just use whatever windows credentials of the user logged into Windows?
NotesSession notesSession = new NotesSession();
notesSession.Initialize();
// An empty servername means we go to the locally installed Lotus Notes
string serverName = String.Empty;
NotesDbDirectory directory = notesSession.GetDbDirectory(serverName);
NotesDatabase notesDatabase = directory.OpenMailDatabase();
if (!notesDatabase.IsOpen)
{
notesDatabase.Open();
}