AnsweredAssumed Answered

IGISServerConnection2 conn = new GISServerConnectionClass(); Conn.Connect(); Returns Class not registered error

Question asked by asarkar@alletec.com on Sep 2, 2020
Latest reply on Sep 23, 2020 by asarkar@alletec.com

I am executing following code from VS 2019 from a ServerObjectExtension and getting error gisConnection.Connect().

 

            IGISServerConnection2 conn = new GISServerConnectionClass(); //GISServerConnection()

            conn.Connect2("arcgis","NTPCSRV01"); --- Returns error

            conn.Connect( "NTPCSRV01"); -- Returns error

 

Error Message - System.Runtime.InteropServices.COMException HResult=0x80040154 Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Source=ESRI.Server.Server

 

Even if I referenced ESRI.ArcGIS.Server then also I receive similar error.

Outcomes