Before you deploy a Web Mapping Application to a production server, you may need to install and configure required software on the production server. The GIS software used in the application must be authorized and licensed at an appropriate level. You may also need to set up services and copy data to production servers.
Moving the Web Mapping Application itself involves two types of steps. First, you deploy the website using standard ASP.NET deployment techniques. Second, you may need to make some modifications to the configuration of the website if the GIS server or services used in deployment are different from those used in development.
The instructions below include steps both for configuration for GIS server and services and for website deployment.
Licensing
The Web Mapping Application uses services from one or more GIS servers, which can include ArcGIS Server, ArcIMS and ArcWeb Services. The Web and GIS servers must have appropriate licensing for the ESRI software used. The Application Developer Framework (ADF) installed on the Web server must be licensed in connection with ESRI server software, whether you install the full server software package or just the ADF Runtime. Installations of the Web ADF and server software for development also requires a license. The ESRI Developer Network (EDN) offers licenses of ESRI software specifically for development. See About the EDN Subscription Program for more information on EDN for development purposes.
Below is a brief summary of licensing for ESRI server software. For details, consult the Help for the respective software, or contact your local ESRI account representative.
-
ArcGIS Server
- All components of ArcGIS Server must be licensed. The post-installation for ArcGIS Server will prompt to authorize the computer on which you are installing the software. The licensed components of ArcGIS Server include the ADF, Server Object Manger (SOM), Server Object Container (SOC) and the Spatial Database Engine (SDE).
- ArcGIS Server offers a scalable line of server product editions built on a common set of technology components that are distinguished by both functionality and capacity. The functionality in ArcGIS Server is provided via three different editions: Basic, Standard, and Advanced. Each of these three functional editions is provided at two separate levels, scaled according to capacity. The two levels are Workgroup and Enterprise. To view a functionality matrix describing which features are available at each edition and level, please see the ArcGIS Server literature page on the ESRI Web site.
-
ArcIMS
- ArcIMS requires a license for Spatial Server. The post-installation for ArcIMS will prompt to authorize the computer on which you are installing the software.
-
ArcWeb Services
-
ArcWeb Services does not require any local software to be installed. Your web
application only needs to provide required credentials for the ArcWeb Services
account used in the application.
-
ArcWeb Services does not require any local software to be installed. Your web
application only needs to provide required credentials for the ArcWeb Services
account used in the application.
Deployment steps
- Prepare web application during creation and development
- Install required software, data and services on production servers
- Deploy (copy) the website to the production Web server
- Enable the website folder as a Web application in IIS
-
Update settings for servers, services and identity
1. Prepare web application during creation and development
Some practices to follow as you create your web application:- Service names: Use the same names for map services and other services as you will use on the production server. If different names are used, some configuration changes will need to be made in the website files. Details are given below.
- Data layers and schemas: Use the same data layers in each service as will be used during production. At minimum, use data layers with the same schemas (field names), spatial references, etc. as will be used in production. Layers can have different numbers of features (records). Controls in the Web Mapping Application, such as MapTips and QueryAttribute task, store information such as layer position within the map and field names. If the layer names or fields differ, the Web Mapping Application may fail.
- Server names: If feasible, use the same GIS server(s) for services as will be used in production. If different server names are used at deployment, then you will need to modify the configuration of the application. Details on these modifications are in the section on updating settings for servers, services and identity.
- ArcGIS Identity: When using ArcGIS Server Local services, it is always necessary to add an identity, with domain, username and password, to the web application. Manager automatically encrypts and stores the identity used when adding the ArcGIS Server machine to Manager. If using Visual Studio to create the application, you add the identity with the Add ArcGIS Identity utility. You can choose to encrypt this identity as well. When you deploy the application, you must update the identity credentials. See the section below on updating ArcGIS identity for details.
- Precompiling applications: If you will use the ASP.NET option to precompile the web application before deployment, you will need to set the values for the server and services on the production server before compilation. See the section below on settings for servers and services for information on values needing to be changed before precompilation.
-
Turn debugging off: If you have developed or customized the Web Mapping
Application within Visual Studio, you should turn debugging off in the
application before deployment. Debug versions will cause slower performance and
are normally unnecessary on deployment servers.
-
To turn off debugging, open the web.config file in a text editor, and if the
<compilation> tag exists, change the debug value from true to false:
<compilation debug="false" >
- Save the web.config file.
- Also check each .aspx page to ensure that if the <@Page> directive at the top of the file contains a Debug attribute, it is set to false.
-
If you have customized your web application by adding a DLL from another
project that you or others created, make sure that you have a release version
of that DLL. The DLL will be within the bin folder inside you web application.
Usually a release version will have no .pdb file with the .dll file, or if
present, its date is older than the DLL file.
-
To turn off debugging, open the web.config file in a text editor, and if the
<compilation> tag exists, change the debug value from true to false:
2. Install software, data and services on production servers
- Required software: Install at minimum on production Web server (in this order): IIS, .NET Framework (same version used during development), and the ESRI Web ADF Runtime. The version of ESRI software must be the same on the deployment machine as on the development machine, including service packs, if any.
- Optional installations: Visual Studio 2005 or Visual Web Developer Express 2005 (VWDE), ESRI Web ADF full install with server software (instead of ADF Runtime). Visual Studio or VWDE makes configuration easier on the production server, but some organizations do not allow development software on production machines.
-
Data and GIS Servers: If needed, install the data (files and/or ArcSDE),
and GIS software (ArcGIS Server and/or ArcIMS) on server(s) accessible to the
production Web server. See the Help for
ArcGIS Server or ArcIMS
for information on installing and configuring those packages.
- If the web application uses ArcGIS Server, the edition used in deployment must support the functionality used in the application. For example, if the web application performs editing using the Editing task, the Advanced edition of ArcGIS is required.
- If using a different GIS server (ArcGIS Server and/or ArcIMS) than for development, create services with the same data used during development. Use the same name for services if possible. The same data layer names, with the same schemas (field names, etc.) should be used. The easiest approach is to use the same projects (mxd, axl, loc files, etc.) as used in development. If the data layer names or fields differ, the Web Mapping Application may not work as expected on the production server. The data layers can differ in number of features (records) and in values within records and fields.
- See the product Help and the ESRI Support website for documents on distributed and fail-over configurations for ArcGIS Server or ArcIMS.
- User and role data: If you secured your application with Manager (or other standard method), you may need to copy the user and role data from the development environment to the production environment.
-
Windows Server 2003: If using Windows 2003 Server, you may need to allow
ASP.NET applications. In IIS Manager, go to <Server
name> > Web Service Extensions. If ASP.NET v2.0.xxxx is not
marked as Allowed, select it in the list and click Allow.
3. Deploy (copy) the website to the production Web server
Options for deploying the website to the deployment Web server include the following. For more information, consult sources on ASP.NET deployment, such as this Microsoft article: Deploying ASP.NET Applications in IIS 6.0.
-
Copy website (Xcopy deployment)
- Uses a command prompt to copy the entire folder to another computer.
- Similar to copy/paste, e.g., with Windows Explorer, but additional options. It is possible to simply use Windows Explorer instead, but you may miss hidden files and attribute settings on files.
- See Windows Help for Xcopy options and examples, or this Microsoft article on deployment using Xcopy.
-
VS2005’s Copy Website tool
- To use this option, you must be able to connect to the deployment server in one of three ways: mapped drive, ftp, or Front Page Extensions. For information on installing Front Page Extensions, please refer to instructions at the Microsoft website.
- For details on using the Copy Website tool, see the Visual Studio Help topic "Copying Web Sites with the Copy Web Site Tool".
-
Deployment using a zip file
- Use if you cannot map a drive to the deployment server, or cannot use the Visual Studio copy website tool. This option may skip hidden files and some attributes of files.
- When creating a zip file of the website, make sure to include subfolder paths in the zip file.
-
Installer package
- If you have created a web application that will be deployed on multiple servers, you might consider creating an installer package for the website. See online resources or books on ASP.NET for information on creating installer packages.
4. Enable the website folder as a Web Application in IIS
The website must be marked in IIS as a web application. How you do this depend on whether the newly copied website folder is within the C:\Inetpub\wwwroot folder or elsewhere on the production machine. In the second case, you must set the website folder as a virtual directory. For further details, see this Microsoft article on creating web applications in IIS.a) Mark a folder inside C:\Inetpub\wwwroot as an application:
- Open IIS Manager from Control Panel > Administrative Tools.
- Expand the left-hand panel of IIS Manager to find your website location. In Windows 2003 Server, the website will be inside the Web Sites subfolder in the left panel. By default, folders in wwwroot are found in the Default Web Site tree.
- Right-click on the website folder and choose Properties.
- In the Properties dialog that opens, click the Directory tab.
- In the Directory panel, under the Application Settings area, click the Create button. This sets the website name in the Application name box, and changes the button name to Remove. (If the button already says Remove, the website is already set as an application.)
- Make sure that the Execute permissions item is set to Scripts only.
- Click OK to have the settings take effect. You can then close IIS Manager.
b) Create a virtual directory for a folder elsewhere on the system:
- Open IIS Manager from Control Panel > Administrative Tools.
- Expand the left-hand panel of IIS Manager and click on the Default Web Site item. This displays websites currently set up for IIS.
- Right-click on Default Web Site, and from the pop-up menu, choose New > Virtual Directory. The Virtual Directory Creation Wizard opens.
- In the introductory panel of the wizard, click Next.
- In the wizard panel for the Virtual Directory Alias, type a name for the website. This is the name users will type in to get to the website. For example, if you use the name MapViewer1, the URL for the site will be http://<server name>/MapViewer1. After entering a name, click Next.
- In the panel for Web Site Content Directory, click Browse and navigate to the website folder you copied to the production server. Then click Next.
- In the panel for Virtual Directory Access Permissions, check the boxes for Read and Run scripts. Click Next.
- Click Finish to complete creating the virtual directory. You can then close IIS Manager.
5. Update settings for servers, services and identity
If the web application on the deployment server will use different server(s) or different service names than the development server, these values must be updated in the web application. Also, if your web application uses ArcGIS Server Local services, then you must modify the identity used by the application.
If the application is secured to require user login, you may need to update the
connection information in the web.config file to enable the application to
connect to the membership and role provider data. See the information in the
page on ASP.NET Security.
The easiest approach to updating values for servers and services is to use
Visual Studio 2005 or Visual Web Developer Express. If available, open the web
application and then the default.aspx page, switch to design view, and set the
resource manager values (MapResourceManager and any others used, such as
GeocodeResourceManager). Use the “smart tag” on the resource manager control to
edit the resource properties.
If Visual Studio or VWDE is not available, and the GIS server or service names
are different on the deployment server, you must modify the properties
manually.
To manually modify the GIS server or services in the Web Mapping Application
- Identify any server, service names, and usernames/passwords that need to be updated. If necessary, open the web application on the development machine and record the values in the MapResourceManager, GeocodeResourceManager and GeoprocessingResourceManager controls. Determine the new values for the corresponding servers and services on the deployment machine.
- Open default.aspx in a text editor (Notepad, etc.) or development environment (Visual Studio, etc.). If you have customized the web application by adding other pages with additional ADF resource managers, you may need to update values for server and services on those pages as well.
- Search for the GIS server name used during development, and replace this value with the GIS server to be used in deployment. For ArcGIS Server Internet or ArcIMS HTTP resources, be sure to obtain the correct server URL (e.g., http://<servername>/arcgis/services ). Then update map and other service names, if they are different on the production GIS server. These values may be within tags for a MapResourceManager, GeocodeResourceManager and GeoprocessingResourceManager. Replace only the server or service values. Preserve the escaped version of quote (") and other characters. Do not add extra spaces or characters to the resource strings.
- If the production GIS server uses ArcGIS Server Local resources, see the section below on updating the ArcGIS identity.
-
If the production GIS server requires adding a username/password for ArcIMS,
ArcGIS Server Internet, or ArcWeb Services resources, or these values are
different from those used on the development server, then you will need to
add or modify these identity values. The Identity portion of the
Definition attributes for the resource manager(s) must be set to values
that are valid for the production GIS server.
If available on the production server, use Visual Studio or Visual Web Developer Express (VWDE) to generate an encoded version of the username/password credentials. If Visual Studio and VWDE are not available on the production server, you can either create encoded values in Visual Studio on a development machine and copy/paste them into the page on the production server, or use the ADFUtil program to create the encrypted identity.
To create the identity using Visual Studio on a development server, open the application and set the identity for each resource manager, save the page, and copy it to the production server. If the login for the production server is not recognized on the development machine, you can also create an identity in a temporary resource item or page without actually running the page, then copy the identity value from the page. An example of a resource item definition with an identity value is given below.<esri:mapresourcemanager id="MapResourceManager1" runat="server"> <ResourceItems> <esri:MapResourceItem Name="World" Definition="<Definition DataSourceDefinition="localhost@5300" DataSourceType="ArcIMS" Identity="WMYMENUMWCPZUKYRAIIBDEFBPZ" ResourceDefinition="World" DataSourceShared="True" />" DisplaySettings="visible=True:transparency=0:mime=True:imgFormat=PNG8:height=100:width=100:dpi=120:color=:transbg=False" /> </ResourceItems> </esri:mapresourcemanager>To use the ADFUtil program to create the encrypted identity on the production server:- Open a command prompt by clicking Start-Run and entering cmd and clicking OK.
- Change to the DotNet directory within your ArcGIS installation folder, for example by typing cd "C:\Program Files\ArcGIS\DotNet" and click the Enter key (use quotation marks around the path when it contains spaces).
- Enter the command to create the encrypted identity by using the -i
option for adfutil. Include the username and password, separating the two
with a semicolon, e.g.:
ADFUtil.exe -i myusername;mypassword - A prompt will open with the encrypted identity. Enter this identity into the
Identity setting in the resource manager's Definition string (see example of the
Definition above). For example, if the encrypted string is bDQLnmv1Mwkh9@3PKMbB0C==,
the Identity part of the Definition would be set to
Identity="bDQLnmv1Mwkh9@3PKMbB0C=="
To update the ArcGIS Identity
If your Web Mapping Application uses ArcGIS Server Local services, an identity is stored in the website for accessing those services. If a different GIS server or ArcGIS user is used for deployment than for development, you will need to update the identity. This is true even if you use a domain account for the identity and the production computer is a member of the domain. To update the ArcGIS identity, see instructions in the Help page ASP.NET Identity and Impersonation.