I developed this small windows form application which uses arcgis server dll's and restart the server object. I hardcoded the server name , server object name in the code. Actually I dont have time to create modify this code so that it accepts command line arguments. You can actually use this code and create a windows utility to restart a server object. Please let me know if it worked for you or not.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.ADF;
using ESRI.ArcGIS.ADF.ArcGISServer;
using ESRI.ArcGIS.ADF.Connection;
using ESRI.ArcGIS.Server;
namespace som_admin
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// Using the ArcGIS Connection library
ESRI.ArcGIS.ADF.Identity id = new ESRI.ArcGIS.ADF.Identity("username","password","Domain name");
ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsconn;
agsconn = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("server name", id);
agsconn.Connect();
IServerObjectAdmin soa = agsconn.ServerObjectAdmin;
soa.StopConfiguration("world", "Mapserver");
soa.StartConfiguration("world", "MapServer");
}
}
}
Hope this helps.
Thanks
Aditya
Restart individual map server objects via the command line or code
Select tool in arcgis server 9.2.
Select tool in arcgis server 9.2. edn have very good example for this select tool where it creates a seperate graphic layer for the the selected features... Please go to the following link for ESRI code and documentation for select tool (This tool is for selecting features in a single layer)
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/Common_SelectBufferTool/f7dc788a-381a-4395-8510-5bb004cd742f.htm
Subscribe to:
Posts (Atom)