Problem connecting to a Lotus Notes server

Hi,

I’m getting the error message ‘Notes error: Wrong Password. (Passwords are case sensitive - be sure to use correct upper and lower case.)’ when I try to connect to Lotus Notes 6.5 on a server.

Note I’m trying to connect through VB .Net, through a COM interface. The line of code the software is failing on is ‘sess.Initialize(passwd)’, where sess is a variable of type NotesSession and passwd is a variable containing the correct password. I know that I’m using the right password, because my code works fine the first it is run. I’m thinking that my problem lies in the re-initialisation of the sess variable.

Does anybody know how to properly close down the NotesSession object?

I would appreciate any help anybody can give me.

Subject: Problem connecting to a Lotus Notes server

Try If not sess is nothing set sess = Nothing;

Hope you are creating the object and then initialising the session:

Set sess = CreateObject(“Lotus.NotesSession”)

Call sess.Initialize(passwd)

Subject: Problem connecting to a Lotus Notes server

I have been able to solve this problem myself. The solution to the problem is :-

Dim sess As NotesSession

Try

Try

 sess = New NotesSession

 -- DO WHAT EVER.

End Try

Finally

sess = Nothing

GC.Collect()

End Try

Subject: RE: Problem connecting to a Lotus Notes server

Alternatively:


Dim sess As New NotesSession ’ this will initialize the session in one step

Try

’ DO WHAT EVER IS NEEDED

Finally

sess.close ’ terminate session

GC.Collect() ’ Take out the trash

End Try


HTH,

Shawn