Professional Documents
Culture Documents
Platforms N/A
:
Summary
Instructions provided describe how to create a simple ArcGIS Server ASP.NET web page.
For diagnostic purposes it is helpful to use a minimal application, where possible, to test
whether ArcGIS Server and the .NET Application Developer Framework (ADF) are
configured and working properly.
Procedure
Before running this sample the .NET ADF needs to be installed on the web server, ArcGIS
Server needs to be installed and working, and all system requirements need to be met.
1. Create an ASP.NET application directory. This can be done by way of the following
steps:
A. Change the Host attribute in the esri:map tag to be the machine where the ArcGIS
Server Server Object Manager is running.
B. Change the ServerObject to a running MapServer server object. Keep in mind that
the server object names are case sensitive. 'World' is different than 'world'.
6.
<html>
7.
<head>
8.
</head>
9.
<body>
10.
<form id="WebForm" method="post" runat="server">
11.
<esri:map id="TheMap" UseMIMEData="True" Width="400px"
Height="400px"
12.
style="LEFT: 200px; POSITION: relative; TOP: 30px"
runat="server"
13.
BorderStyle="Solid" BorderColor="200,170,35"
BorderWidth="10px"
14.
ServerObject="PoliticalEarthquakes" Host="tao"
AutoFirstDraw="True">
15.
</esri:map>
16.
</form>
17.
</body>
18.
</html>
19. Create a web.config file in the ASP.NET application directory. A sample web.config
file is shown below.
Configure the file to use an account that is in the agsusers group on the ArcGIS Server
machine.
Storing a username and password in clear text in the web.config file may not be a
secure way to store this information. Microsoft provides mechanisms to encrypt this
information. This example is intended only for diagnostic purposes.
</configuration>
If ArcGIS Server is installed and the .NET ADF is working then a map should appear.
28. When done testing delete the files in the directory - in particular the web.config file if
it contains a clear text password.