http://www.gissky.net- GIS空间站

我要投稿 投稿指南 RSS订阅 网站资讯通告:
搜索: 您现在的位置: GIS空间站 >> 技术专栏 >> ArcGIS >> ArcGIS Server >> 正文

ArcGIS Server操作Mxd文件详细讲解

作者:liyuanxi…    文章来源:liyuanxiang    点击数:    更新时间:2009-6-20
摘要:

还有一点必须主要的,Mxd更改以后,地图服务是没有发生变化的,所发布的地图一直驻留在内存中。因此,这时候需要更新一下地图服务。
方法有很多,最傻瓜最直接的方法就是跑到机房去重启mxd所对应的service。但是,懒羊羊比较懒,所以,还是希望通过代码去控制,update
一下。下面是更新地图服务的函数
private void updateService(string serviceName,string serverName)
    {
        ServerConnection pServerConnection = new ESRI.ArcGIS.Server.WebControls.ServerConnection(serverName);//地图服务机器名
        pServerConnection.Connect();
        IServerObjectAdmin pServerSOA = pServerConnection.ServerObjectAdmin;
        IServerObjectConfiguration pConfig = pServerSOA.GetConfiguration(serviceName, "MapServer");
        pServerSOA.UpdateConfiguration(pConfig);
    }

细心的朋友应该注意到了,这里面主要是使用了IServerObjectAdmin 接口,IServerObjectAdmin 接口功能十分强大,建议去查一下帮助,
对其加深了解。
4.JPG

5.JPG

描述
RemarksAny application that runs as a user account in the agsadmin user group on the ArcGIS Server can use the IGISServerConnection interface to connect to the ArcGIS Server and to get a reference to the ServerObjectAdmin. If the user account is not part of the agsadmin user group the ServerObjectAdmin property on IServerConnection will return an error. Applications that are running as accounts that can connect to the server but are not part of the agsadmin user group can use the ServerObjectManager property on IGISServerConnection to get a reference on the ServerObjectManager.
The IServerObjectAdmin interface has the necessary methods for an application to adminstrate both the set of server object configurations and types associated with the server, and to administer aspects of the server itself. The following administration functionality of the ArcGIS Server is exposed by methods and properties on IServerObjectAdmin :
Adminster server object configurations:
  • Add and delete server object configurations
  • Update a server object configuration's properties
  • Start, stop and pause server object configurations
  • Report the status of a server object configuration
  • Get all server object configurations and their properties
  • Get all server object types and their properties
Administer aspects of the server itself:
  • Add and remove server container machines
  • Get all server container machines
  • Add and remove server directories
  • Get all server directories
  • Configure the server's logging properties

上一页  [1] [2] [3] [4] [5] 下一页

Tags:ArcGIS Server,Mxd  
责任编辑:gissky
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 中国地图