Hello guys,
I'm developing an application to connect with the company's ERP database. I referenced the DLL correctly in my application and locally it is working perfectly. This DLL is just to test if the user who is logging into the application is really from the ERP base.
However, when I publish on the server, the message appears:
"Factory retrieval of COM classes from component with CLSID {5FC3E75E-9D58-481E-8178-945B5ABADD1C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Description: An unhandled exception occurred while executing the current web request. Examine the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Factory retrieval of COM classes of component with CLSID {5FC3E75E-9D58-481E-8178-945B5ABADD1C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ."
Below is the VB and HTML codes:
VB:
Imports System
Imports CPConnect
Partial Class index
Inherits System.Web.UI.Page
Public Sub New()
InitializeComponent()
End Sub
Private Sub EfetuaLogin(ByVal pLogin As String, ByVal pSenha As String)
Dim usuario As LoginClass = New LoginClass()
Dim coderro, msgerro, nulo As Object
coderro = usuario.ErrorCode
msgerro = usuario.ErrorMessage
nulo = Nothing
usuario.GetAccessParams(True,
"corporeRM",
Convert.ToString(pLogin),
Convert.ToString(pSenha),
"S", nulo, coderro, msgerro)
If coderro = CObj(0) Then
LbMensagem.Text = "Usuário logado com sucesso!"
Else
If coderro <> CObj(0) Then
LbMensagem.Text = msgerro.ToString()
End If
End If
End Sub
Private Sub frmLogin_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
TxtLogin.Text = DBNull.Value.ToString
TxtSenha.Text = DBNull.Value.ToString
End If
End Sub
Private Sub InitializeComponent()
'>>> In development environment, the commented command returns the following error:
'>>> An exception of type 'System.NotImplementedException' occurred in App_Web_i2mgo1gs.dll but was not handled in user code
'Throw New NotImplementedException
End Sub
Protected Sub BtnLogin_Click(sender As Object, e As EventArgs) Handles BtnLogin.Click
EfetuaLogin(TxtLogin.Text, TxtSenha.Text)
End Sub
End Class
How can I resolve these issues?
Yours sincerely,
Ilano.