Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Retrieving the COM class factory for component with CLSID {00853A19-BD51-419B-9269-2DABE57EB61F} failed due to the following error: 80040154.

C#
protected void btnconnect_Click(object sender, EventArgs e)
   {
       if (btnconnect.Text == "Connect")
       {


           zkemkeeper.CZKEMClass axczkem1 = new zkemkeeper.CZKEMClass();
//here above line shows the error (Retrieving the COM class factory for component with CLSID {00853A19-BD51-419B-9269-2DABE57EB61F} failed due to the following error: 80040154.)

           int port = Convert.ToInt32(txtportno.Text);
           string ipaddress = txtipaddress.Text;
           flag1 = axczkem1.Connect_Net(ipaddress, port);
           if (flag1 == true)
           {
               btnconnect.Text = "DisConnect";

               lblState.Text = "Current State:Connected";
               iMachineNumber = 1; 
               //axCZKEM1.RegEvent(iMachineNumber, 65535); 
               tlbdeviceinformation.Visible = true;

           }
           else
           {
               axczkem1.GetLastError(ref idwErrorCode);
               tlbdeviceinformation.Visible = false;
               gp.DisplayMessage(this.Page, "Unable to connect the device,ErrorCode=" + idwErrorCode.ToString() + "Error");
           }
       }
       else
       {
           btnconnect.Text = "Connect";
           tlbdeviceinformation.Visible = false;
           txtipaddress.Text = txtportno.Text = "";
           lblState.Text = "";
           ddlMachineNo.SelectedIndex = -1;
           Response.Redirect("Device_Management.aspx");
       }
Posted
Updated 10-Jul-15 2:17am
v2
Comments
[no name] 10-Jul-15 6:34am    
Did you register the DLL and/or the dependency DLLs on the host machine?
RD pandit 10-Jul-15 6:45am    
yes i register zmkemkeeper dll
[no name] 10-Jul-15 6:50am    
Change your target to x86
RD pandit 10-Jul-15 6:57am    
how to change the target, bcause i m working on website and it does'nt show that property in VS2005
Sergey Alexandrovich Kryukov 10-Jul-15 13:56pm    
This is just some fragment of server-side code, not really relevant to the problem. Are you using a biometrics device on the server side? Hard to believe that. I would rather guess that you need reading biometrics data from the client-side device. But how?
You should understand that W3 standardization on biometrics is only emerging. Without it, people use something line ActiveX embedded on a Web page, which is pure evil...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900