I have added a dll library inside my ASP.NET framework c# project and I have created a ASP.NET FRAMEWORK API CONTROLLER in this ASP.NET FRAMEWORK c# project.
Inside this API CONTROLLER class, I have created a function called fnGetTerminalInfo() that instantiates an object of the dll library interface class.
I tried to run the API controller
localhost:xxxxx/api/conGetTerminalInfoAPI/fnGetTerminalInfo in a localhost and it works perfectly.
However, after deploying the project to IIS and run the API controller using this url <ip address>:<port number>/api/conGetTerminalInfoAPI/fnGetTerminalInfo in a browser, I received an error that says
Retrieving the COM class factory for component with CLSID {5DC9FDA1-B975-49BF-8A89-05068714BAFD} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). System.Runtime.InteropServices.COMException
However when I removed the code(s) that instantiates an object of the dll library interface class from the function fnGetTerminalInfo(), the error disappeared.
Does anyone know what causes the error? Thank You :) Looking forward to your answer :)