Summary
Instructions provided describe how to configure the ArcGIS Server REST API for Microsoft .NET Framework to improve the performance and reliability of ArcGIS Server REST Web services.
By default, the REST services are set up to impersonate the ArcGIS Web services user. When the REST services are subject to heavy load (more than 25 concurrent requests per second), the Local Security Authority Subsystem Service (lsass.exe) process, which is responsible for per-request authentication, can use CPU and memory resources at an excessive rate. This can quickly lead to degradation of performance and stability of the REST services over time.
Procedure
To alleviate this problem, Esri recommends ArcGIS REST Web services be configured to use a separate application pool with a fixed identity.
The steps below show how to configure the ArcGIS Web Services (SOAP and REST) to run in a separate IIS application pool with the identity of the ArcGIS Web services user and how to disable per request impersonation.
The following instructions assume that the ArcGIS Web services account is called ArcGISWebServices (the default specified in the ArcGIS Server post installation utility). Modify this account name as appropriate for the system being used.
Before you begin, install 9.3 Service Pack 1 or later.
Instructions for Windows Server 2003
- Create a new IIS Application Pool and set its identity to the ArcGIS Web services account.
- Open Internet Information Services (IIS) Manager and navigate through the tree structure to the Application Pool folder.
- Right-click the Application Pool folder and click New > Application Pool.
- Give the application pool an ID, such as ArcGIS Server Services Application Pool, and select the option to continue with the default settings.
- Right-click the new application pool and click Properties.
- Click the Identity tab and select Configurable.
- Enter the name and password of the ArcGIS Web services account that was specified during the ArcGIS Server post installation process. Click OK.
- Re-enter the password to confirm and click OK.
Note:
With ArcGIS Server 10, this application pool already exists. Apply steps d-g to this application pool.
- Add the ArcGIS Web services account to the IIS_WPG local operating system group.
- From the Windows Control Panel > Administrative Tools, open the Computer Management console.
- In the navigation pane, under the System Tools group, expand the Local Users and Groups node. Click Groups.
- In the details pane, right-click the IIS_WPG group and select Properties.
- In the IIS_WPG Properties dialog box, click the Add button.
- In the Select Users, Computers, or Groups dialog box, change the entry under 'From this location', if necessary, to the location that contains the user account for the ArcGIS Web services (ArcGISWebServices). If the account is on the local computer, the location should be the local machine name.
- Type the account name into the box under ‘Enter the object names to select’, click Check Names, and select the user.
Alternatively, click the ‘Advanced’ button, type account name or description and click ‘Find Now’. Select the user from search results, and click OK to return to the Select Users dialog box. - Click OK in the two dialog boxes to save the settings. Close the Computer Management window.
- Grant the ArcGIS Web services account permissions to the IIS metabase.
- If the Microsoft .NET Framework SDK is installed on the machine, follow these instructions:
- Open a .NET command prompt with Start > (All) Programs > Microsoft .NET Framework SDK v2.0 > SDK Command Prompt.
- Type the following command at the prompt, substituting the ArcGIS Web services account name as appropriate:
aspnet_regiis -ga ArcGISWebServices
- Close the .NET command prompt by typing 'exit' and pressing the Enter key.
- If the Microsoft .NET Framework SDK is not installed, these instructions apply:
- Open a command prompt window by clicking Start > Run, typing 'cmd' in the Run dialog box, and pressing Enter.
- Type the following commands at the command prompt, substituting the ArcGIS Web services account name, as appropriate:
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_regiis -ga ArcGISWebServices
- Close the command prompt window by typing 'exit' and pressing the Enter key.
- Grant Modify permissions to the ArcGIS Web services account for the C:\Windows\Temp directory.
- Open Windows Explorer and navigate to the C:\Windows\Temp directory.
- Right-click C:\Windows\Temp and click Properties.
- In the Properties dialog box, click the Security tab.
- In the Security dialog box, click Add. The Select Users dialog box opens.
- In the Select Users dialog box, change 'From this location', if necessary, to the location of the ArcGIS Web services account, and type the account in the lower box (or browse to it with the Advanced button). Click OK to return to the Properties dialog box.
- In the Properties dialog box, make sure the ArcGIS Web services user is highlighted, and in the Allow column, check the Modify box.
- Click OK to save and close the Properties dialog box. Windows Explorer may also be closed.
- Set the ArcGIS Web services application to not use impersonation.
- Use Visual Studio or a text editor to open the web.config file in the C:\Inetpub\wwwroot\ArcGIS\Services folder (the ArcGIS Services folder may have been installed at a different location).
- In the web.config file, change the value for the Impersonate key to false:
<appSettings>
<add key="ServiceInfoRefreshTimeInSeconds" value="1-" />
<add key="GCInterval" value="10" />
<add key="Impersonate" value="false" />
</appSettings>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the key attribute to ''Impersonate'' and the value attribute to ''false'' as shown above.
- Save the web.config file.
- Set the ArcGIS REST application to not use impersonation.
- Use Visual Studio or a text editor to open the rest.config file in the C:\Inetput\wwwroot\ArcGIS\REST folder (the ArcGIS REST folder may have been installed at a different location).
- In the rest.config file, change the value for the Impersonate key to false:
<?xml version="1.0" encoding="utf-8"?>
<Config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
...
<Impersonate>false</Impersonate>
</Config>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the value to 'false' as shown above.
- Save the rest.config file.
- Add the ArcGIS Web services and REST applications to the newly created application pool.
- Open the Internet Information Services (IIS) Manager from Control Panel > Administrative Tools.
- Expand the local computer node, the Web sites node, the Default Web site node, and the ArcGIS node.
- In the ArcGIS node, right-click Services and click Properties. The Properties dialog box opens for Services.
- On the Virtual Directory tab, select the 'Application pool' drop-down list and select the application pool created in step 1 of this article.
- Click OK to save and close the Properties dialog box.
- Repeat steps c through e for the REST services using 'REST' instead of 'Services' in step c.
- Close the IIS Manager.
Note:
With ArcGIS Server 10, the REST and SOAP endpoints are already in this application pool. This step can be skipped.
- Restart the ArcGIS Server Object Manager (SOM) service.
- Open the Services console from Control Panel > Administrative Tools.
- Right-click the ArcGIS Server Object Manager service and click 'Restart'.
- Close the Services window.
Instructions for Windows XP
Note:
Back up the machine.config file before editing it.
- Open the following file in Visual Studio or a text editor: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config. Locate the <processModel> section shown below (found below the element: <section name="processModel"...>). Add or modify the userName and password attributes inside the processModel element as follows:
<system.web>
<processModel userName="MyArcGISServer\ArcGISWebServices" password="MyPassword"/>
</system.web>
Save the machine.config file. - Grant the ArcGIS Web services account permissions to the IIS metabase.
- If the Microsoft .NET Framework SDK is installed on the machine, follow these instructions:
- Open a .NET command prompt with Start > (All) Programs > Microsoft .NET Framework SDK v2.0 > SDK Command Prompt.
- Type the following command at the prompt, substituting the ArcGIS Web services account name as appropriate:
aspnet_regiis -ga ArcGISWebServices
- Close the .NET command prompt by typing 'exit' and pressing the Enter key.
- If the Microsoft .NET Framework SDK is not installed, these instructions apply:
- Open a command prompt window by clicking Start > Run, typing 'cmd' in the Run dialog box, and pressing Enter.
- Type the following commands at the command prompt, substituting the ArcGIS Web services account name, as appropriate:
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_regiis -ga ArcGISWebServices
- Close the command prompt window by typing 'exit' and pressing the Enter key.
- Grant Modify permissions to the ArcGIS Web services account for the C:\Windows\Temp directory.
- Open Windows Explorer and navigate to the C:\Windows\Temp directory.
- Right-click C:\Windows\Temp and click Properties.
- In the Properties dialog box, click the Security tab.
- In the Security dialog box, click Add. The Select Users dialog box opens.
- In the Select Users dialog box, change 'From this location', if necessary, to the location of the ArcGIS Web services account, and type the account in the lower box (or browse to it with the Advanced button). Click OK to return to the Properties dialog box.
- In the Properties dialog box, make sure the ArcGIS Web services user is highlighted, and in the Allow column, check the Modify box.
- Click OK to save and close the Properties dialog box. Windows Explorer may also be closed.
- Set the ArcGIS Web services application to not use impersonation.
- Use Visual Studio or a text editor to open the web.config file in the C:\Inetpub\wwwroot\ArcGIS\Services folder (the ArcGIS Services folder may have been installed at a different location).
- In the web.config file, change the value for the Impersonate key to false:
<appSettings>
<add key="ServiceInfoRefreshTimeInSeconds" value="1-" />
<add key="GCInterval" value="10" />
<add key="Impersonate" value="false" />
</appSettings>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the key attribute to ''Impersonate'' and the value attribute to ''false'' as shown above.
- Save the web.config file.
- Set the ArcGIS REST application to not use impersonation.
- Use Visual Studio or a text editor to open the rest.config file in the C:\Inetput\wwwroot\ArcGIS\REST folder (the ArcGIS REST folder may have been installed at a different location).
- In the rest.config file, change the value for the Impersonate key to false:
<?xml version="1.0" encoding="utf-8"?>
<Config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
...
<Impersonate>false</Impersonate>
</Config>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the value to 'false' as shown above.
- Save the rest.config file.
- Restart the ArcGIS Server Object Manager (SOM) service.
- Open the Services console from Control Panel > Administrative Tools.
- Right-click the ArcGIS Server Object Manager service and click 'Restart'.
- Close the Services window.
Instructions for Windows 2008 Server, Windows Vista, or Windows 7
- Create a new IIS Application Pool and set its identity to the ArcGIS Web services account.
- Open Internet Information Services (IIS) Manager and navigate through the tree structure to the Application Pool folder.
- Right-click the Application Pool folder and click Add Application Pool.
- Give the application pool a name, such as ArcGIS Server Services Application Pool, and click OK to continue with the default settings.
- Right-click the new application pool and select Advanced Settings.
- Select the Identity parameter's value and click the ellipsis button (...).
- Select the Custom account option, and click Set.
- Enter the name and password of the ArcGIS Web Services account that was specified during the ArcGIS Server post installation process. Click OK.
- Click OK in the Application Pool Identity dialog box.
- Click OK in the Advanced Settings dialog box.
Note:
With ArcGIS Server 10, this application pool already exists. Apply steps d-h to this application pool. Click 'show me' after Step 1 above to see these steps.
- Grant Modify permissions to the ArcGIS Web services account for the C:\Windows\Temp directory.
- Open Windows Explorer and navigate to the C:\Windows\Temp directory.
- Right-click C:\Windows\Temp and click Properties.
- In the Properties dialog box, click the Security tab.
- In the Security dialog box, click Add. The Select Users dialog box opens.
- In the Select Users dialog box, change 'From this location', if necessary, to the location of the ArcGIS Web services account, and type the account in the lower box (or browse to it with the Advanced button). Click OK to return to the Properties dialog box.
- In the Properties dialog box, make sure the ArcGIS Web services user is highlighted, and in the Allow column, check the Modify box.
- Click OK to save and close the Properties dialog box. Windows Explorer may also be closed.
- Configure the ArcGIS SOAP Web services to not use impersonation.
- Use Visual Studio or a text editor to open the web.config file in the C:\Inetpub\wwwroot\ArcGIS\Services folder (the ArcGIS Services folder may have been installed at a different location).
- In the web.config file, change the value for the Impersonate key to false:
<appSettings>
<add key="ServiceInfoRefreshTimeInSeconds" value="1-" />
<add key="GCInterval" value="10" />
<add key="Impersonate" value="false" />
</appSettings>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the key attribute to ''Impersonate'' and the value attribute to ''false'' as shown above.
- Save the web.config file.
- Configure the ArcGIS REST Web services to not use impersonation.
- Use Visual Studio or a text editor to open the rest.config file in the C:\Inetput\wwwroot\ArcGIS\REST folder (the ArcGIS REST folder may have been installed at a different location).
- In the rest.config file, change the value for the Impersonate key to false:
<?xml version="1.0" encoding="utf-8"?>
<Config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
...
<Impersonate>false</Impersonate>
</Config>
Note:
If the Impersonate key does not exist, add it by inserting the element and set the value to 'false' as shown above.
- Save the rest.config file.
- Add the ArcGIS Web Services (SOAP and REST)to the newly created application pool.
- Open the Internet Information Services (IIS) Manager from Control Panel > Administrative Tools.
- Expand the local computer node, the Sites node, the Default Web Site node, and the ArcGIS node.
Note:
ArcGIS is the default instance name. If a different instance name was selected during the post installation, use that name.
- Under the ArcGIS node, right-click Services and select Manage Application > Advanced Settings.
- In the Advanced Settings, select the 'Application pool' value and click the ellipsis button (...). Select the application pool created in step 1 of this article.
- Click OK in the Select Application Pool dialog box, and click OK in the Advanced Settings dialog box.
- Repeat steps c through e above for the REST services using 'REST' instead of 'Services' in step c.
- Close the IIS Manager.
Note:
With ArcGIS Server 10, the REST and SOAP endpoints are already in this application pool. This step can be skipped.
- Restart the ArcGIS Server Object Manager (SOM) service.
- Open the Services console from Control Panel > Administrative Tools.
- Right-click the ArcGIS Server Object Manager service and click 'Restart'.
- Close the Services window.