Could not load file or assembly Interop.Domino, Version=1.2.0.0

Hi,

We want to run an agent using Asp.net web page to update a document. The agent runs fine for first time or sometimes for second time.

It raise error after that. Here is the error code:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

{“Could not load file or assembly ‘Interop.Domino, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.”:“Interop.Domino, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null”}

Any comment? It seems the com cannot be released.

Here is my code:

        NotesDatabase ntdb = session.GetDatabase(notesServer, "oadata/test.nsf", false);

        NotesDocument doc = ntdb.CreateDocument();

        doc.ReplaceItemValue("Form", "formula");

        doc.ReplaceItemValue("Proposer_NO", "12345");



        doc.Save(true, false);

        string noteid = doc.NoteID;



        doc = null;



        NotesAgent nagnt = ntdb.GetAgent("test_agent");                

           nagnt.RunOnServer(noteid);

        nagnt = null;

The error is on RunOnserver.

Thanks in advance

Wilson

Subject: I wouldn’t use COM for this

You don’t need to use COM if HTTP is running on the DOmino server. Just call the agent via a URL with parameters and then in the agent parse out the parameters. That would be a better approach.

Using COM you need to remember to quit and close the session or you will end up with mulitple notes exes running that will eventually crash the server. You also need an error trap to tidy things up

Subject: Any sample to directly use http approach

Hi,

Is sounds good. Sample code will be great.

Thanks

Wilson