Select to view content in your preferred language

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

3355
12
09-02-2020 04:47 AM
AmitabhaSarkar
Emerging Contributor

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.

0 Kudos
12 Replies
AmitabhaSarkar
Emerging Contributor

Yes, I can connect to ArcGIS Server 10.0 but not 10.8.1

0 Kudos
nicogis
MVP Frequent Contributor

In fact 10.1 or superior doesn't use dcom

0 Kudos
AmitabhaSarkar
Emerging Contributor

Thanks for the confirmation, then what is alternative I need to access Server Object Manager and Create ServerContext. Many thanks in Advance.

0 Kudos