简体   繁体   English

如何使用用户名和密码连接LotusNotes服务器

[英]How do I connect LotusNotes server using username and password

I can connect to the Lotus Notes server using 我可以使用以下方法连接到Lotus Notes服务器

NotesSession.Initialize(password)

method of interop.domino.dll. interop.domino.dll的方法。 Which actually uses the last user name by which the hosted machine has logged in the Lotus Notes server. 它实际上使用托管计算机登录Lotus Notes服务器时使用的最后一个用户名。 There is another method of NotesSession which is NotesSession的另一种方法是

NotesSession.InitializeUsingNotesUserName(userName, password)

But in case of InitializeUsingNotesUserName(userName, Password ) the application needs to be hosted in the Lotus Notes server. 但是,如果使用InitializeUsingNotesUserName(userName,Password ),则该应用程序需要托管在Lotus Notes服务器中。

I don't have access to the Lotus Notes server and the application can't be hosted on the server. 我无权访问Lotus Notes服务器,并且该应用程序无法托管在服务器上。

So my question is, is there any way to connect to LotusNotes server by providing username, password or any other way? 所以我的问题是,是否可以通过提供用户名,密码或任何其他方式来连接到LotusNotes服务器?

The first format is using the current Lotus Notes ID file that is pointed to by the KeyFileName entry in the Notes.ini file. 第一种格式是使用Notes.ini文件中KeyFileName条目所指向的当前Lotus Notes ID文件。 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. 您可以在建立NotesSession之前编写代码来更改该条目,但是这里的要点是,必须为运行代码的计算机上保存的所有用户提供ID文件。 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. 它使用存储在id文件中的经过认证的私钥-因此,这是一个两因素认证过程,Lotus在将其推广用于其他用途之前已经支持了十多年。

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. 注:简单的用户名和密码认证仅适用于Domino服务器,因为这是存储用户信息的Domino目录条目。 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. 而且,它必须由Domino管理员配置-这被认为是组织接受名称/密码提供的较低安全级别。

There is an inbuilt java method called 有一个内置的java方法,称为

NotesFactory.createSession() 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. 您可以将粘贴Notes.jar从Lotus Notes安装目录复制到应用程序库路径,并创建有效的Lotus Notes会话,然后将其传递给您的C#代码或进行进一步操作的任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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