none
Getting COM Error 80004005 while using Interop.Domino.dll RRS feed

  • Question

  • Hi,

    I am using Visual Studio 2008 and .NET 3.5, i have case where in  i use a ASP.NET Web Application and a C# Windows Service to use this Interop.Domino.dll for accessing Lotus Notes and create a Session in NotesDB.

    In these two applications , which ever access the  NOTES DB and creates session it holds a session and it is not  releasing it. When the other application tries to create a session in the NotesDB for a another user account i am getting this COM Error

     

    error: Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80004005.

     

    Any help would be highly appreciated, Thanks in advance.

    Soundararajan Rajendran

    Friday, April 1, 2011 3:06 AM

All replies

  • Hi Soundarajan,

     

    Welcome to the MSDN forum!

    According to your description, it seems that the problem is related to some setting of your NotesDB. I think that when two applications try to create sessions in NotesDB, the NotesDB will lock it so that retrieving from the COM failed. (I assume that the CLSID of “29131539-2EED-1069-BF5D-00DD011186B7” is Interop.Domimno.dll).

     

    Could you please check it firstly?

    Have a nice day!


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 4, 2011 6:32 AM
  • Hi Paul,

     

    Thanks for your reply.

     

    Yes the issue is because of NOTES DB only, but i am not sure whether it is because NOTES DB does not allow multiple access to the same user Id file(document) or the NOTES DB will not allow multiple access to the notes .ini file itself.

    And yes you are correct we are using Interop.Domino for interoperability.

    We have two different applications hosted on the same web server trying to access the same Domino Server. There comes the problem.

     

    It will be great if you will be able to assist on this. Thanks

     

     

    Thanks and Regards

    Soundararajan Rajendran


    Tuesday, April 12, 2011 2:44 AM
  • So have you tried to create session singly by the two applications? If the two applications runs singly, is it works well?

    And could you please provide code snippet related to the issue?

    Maybe you can use the code below:

    using (NotesSession session = new NotesSession())

    {

    session.Initialize("");
    NotesDatabase db = session.GetDatabase("yourserver", "yourdatabase", false);

                    if (!db.IsOpen)

    {

                    Db.Open();

    }

    }

     

    Have a nice day!


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 12, 2011 3:23 AM
  • Hi Paul,

     

    Yes we are able to run it successfully if we run single application (i.e:) only one application creates/initializes session in Notes DB,

    If two applications started together(one after the other ), the first application that access the Notes DB and creates session will hold a lock against it.

    It will not release the lock until we reboot the application server or uninstall/install windows service( in the case of windows service).

     

    The code snippet that used to create a sesssion is given below,

     

    public LotusProvider(string certFile, string certPwd)

            {

                private HiPerfTimer per;


                private NotesSession session; /// WE ARE GETTING ERROR AT THIS LINE ITSELF. IT IS NOT ALLOWING US TO INITIALIZE THE SESSION OBJECT ITSELF.


                private NotesAdministrationProcess adminReg;
                private NotesRegistration Reg;


                using (ApsExceptionHandler exception = new ApsExceptionHandler())
                {
                   
                    session = new NotesSession();               
                    per = new HiPerfTimer();
                   

                    try
                    {
                        this.adminCertFile = certFile;
                        this.adminCertPwd = certPwd;

                        // Set default value
                        this.NotesUserFullName = string.Empty;

                        // Initialize Notes session
                        session.Initialize(this.adminCertPwd);

                       
                        // Create Notes Registration object                   
                        Reg = session.CreateRegistration();
                       

                        // Switch to admin account
                        Reg.SwitchToID(this.adminCertFile, this.adminCertPwd);

                    }
                    catch (Exception ex)
                    {                   
                        throw new Exception(ex.Message);
                    }               
                }
            }

     

     

    If it gives error in Session.Initialize we can use the  "USING", but it is giving error even before that. so i am confused where to check the lock.

    Suffering on this issue for more than a week  :(

     

    Thanks a lot for your timely response.

     

     

    Thanks

    Soundararajan Rajendran

    Tuesday, April 12, 2011 4:33 AM
  • Hi,

     

    Maybe you can use Session State to avoid this issue. But I am not familiar with the feature.

    And I suggest you post thread in ASP.NET Forum. There are experts in that forum so that you may get better response.

     

    Much further information:

    ASP.NET Session State Overview

    ASP.NET Session State

     

    Thank you for your posting and understanding.


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 12, 2011 5:33 AM
  • Hi,

     

    Its not related to ASP Session or State,. This is completely related to Domino Server and ASP.NET interaction.

    Anyways thanks for your replies.

     

    Regards

    Soundararajan Rajendran

    Tuesday, April 12, 2011 6:41 AM
  • Hi Soundararajan,

    Did it work for you ? Do you have an update ?

    Friday, May 10, 2013 7:19 PM