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"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)