简体   繁体   中英

How do I connect LotusNotes server using username and password

I can connect to the Lotus Notes server using

NotesSession.Initialize(password)

method of interop.domino.dll. Which actually uses the last user name by which the hosted machine has logged in the Lotus Notes server. There is another method of NotesSession which is

NotesSession.InitializeUsingNotesUserName(userName, password)

But in case of InitializeUsingNotesUserName(userName, Password ) the application needs to be hosted in the Lotus Notes server.

I don't have access to the Lotus Notes server and the application can't be hosted on the server.

So my question is, is there any way to connect to LotusNotes server by providing username, password or any other way?

The first format is using the current Lotus Notes ID file that is pointed to by the KeyFileName entry in the Notes.ini file. You can write code to change that entry before establishing your NotesSession, but the point here is that you must have ID files for all users saved on the computer that the code is running on. Ie, this is not using a simple username and password to authenticate the user. It's using the certified private key that is stored in the id file - so it's a two factor authentication process, which Lotus supported more than a decade before it was popularized for other uses.

Note: simple username and password authentication is only available for Domino servers because that's where the Domino Directory entries that store user information are. Also, it must be configured by the Domino administrator - which is considered an acknowledgement that the lower security level provided by name/password is acceptable to the organization.

There is an inbuilt java method called

NotesFactory.createSession()

that can quickly help you with this. It comes with a variety of overloaded methods which can accept username and password arguments too.

Details aboutthe same can be found here

You can copy paste Notes.jar from lotus notes installation directory to your application library path and create a valid Lotus Notes session and pass on the same to your c# code or whatever for further manipulations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM