代码
IGISServerConnection pGSC = new GISServerConnectionClass();
pGSC.Connect("GISServer");
IServerObjectManager pSOM = pGSC.ServerObjectManager;
IServerContext pSC = pSOM.CreateServerContext("chinamap9", "MapServer");
IMapServer pMS = pSC.ServerObject as IMapServer;
IMapServerObjects pMSO = pMS as IMapServerObjects;
IMap pMap = pMSO.get_Map(pMS.DefaultMapName);
pSC.ReleaseContext();