Common problems and solutions


Summary
This topic lists some common issues that can occur when working with the Web Application Developer Framework (ADF). Error messages, potential solutions, and reference information are provided where applicable.

In this topic


Map, Toc, and Overview Map do not display

The following shows the issue, solution, and reference information when the Map, Toc, and Overview Map do not display.

Issue

When viewing a Web ADF application in a browser, the Map, Toc, and Overview Map do not display, and no error is returned.

Solution

See the following reasons for this behavior:
  1. If working with ArcGIS for Server local data sources, confirm that the Web application is running as a valid user account (identity). The user should be part of the agsusers or agsadmin group on the machine where the server object manager (SOM) is running. To define an identity in Visual Studio, use the Add ArcGIS Identity context menu on the Web project in the Solution Explorer. You can also define the identity in the web.config file for the Web application using the identity tag in <system.web> as follows:
    • <identity impersonate="true" userName="mydomain\myuser" password="mypassword" /
  2. For more information on ArcGIS identity, see the Project context menus and dialog boxes section in the topic, Visual Studio 2008/2010 integration.
  3. If an identity has been defined for a Web application, confirm that it is correct.
  4. If you are using Internet Explorer on Windows Server 2003, add the Web site as a trusted site.
  5. In Visual Studio, open any resource manager control (for example, MapResourceManager), check the server name, service name, and data frame name for ArcGIS for Server resources. Confirm they are correct.
  6. Confirm that the ArcGIS for Server services being accessed by the Web ADF application are running.
  7. If you are using Internet Explorer, the host name of the machine serving the Web application cannot contain an underscore (_) character. Host names cannot contain underscore characters due to a limitation of the Domain Name System (DNS) and Active Server Pages (ASP). The Microsoft Support Web site states that "Cookies on ASP pages are blocked if the server name contains characters that are not supported by Domain Name System. For example, you cannot use underscore characters in the server name. This behavior is by design."

Reference

For more information, see the Esri Resource Center knowledge base topic, Problem: Map image does not display in a .NET Web application.

Web site cannot be configured with ASP.NET 2.0

The following shows the issue, message, and solution for a Web site that cannot be configured with ASP.NET 2.0.

Issue

When loading a Web application in Visual Studio 2005, you are prompted to convert from a previous version of ASP.NET to ASP.NET version 2.0. After clicking Yes, another message indicates that the site cannot be configured with ASP.NET 2.0.

Message

The site <site url> is currently configured for use with ASP.NET <version>. Microsoft Visual Studio has been designed for use with ASP.NET 2.0; if not configured, some features may make incorrect assumptions, and pages designed with the tool may not render correctly. Would you like the site to be configured for use with ASP.NET 2.0?

Solution

The Web ADF for the .NET Framework requires the .NET 2.0 Framework and ASP.NET 2.0. This issue indicates that Internet Information Services (IIS) is configured to use a version of ASP.NET prior to 2.0 by default. Do the following steps to configure ASP.NET 2.0 with IIS and reload the Web application in Visual Studio 2005:
  1. Install Microsoft .NET Framework version 2.0.
  2. Start a command prompt and navigate to c:\<windows. systemfolder>\Microsoft.NET\Framework\v2.0.50727.
  3. Run the following command to register ASP.NET 2.0 as the default version with IIS:
    •  aspnet_regiis -i
  4. Run the following command to restart the IIS server and finalize the registration process: 
    • iisreset

IIS Admin service terminates

The following shows the issue, message, solution, and reference information for when the IIS Admin service terminates.

Issue

When starting IIS Web services, a generic error is returned and the service fails to start. The event viewer records the error listed in the following Message section.

Message

The IIS Admin service terminated with service-specific error 2148073487 (0x8009000F).

Solution

Do the following steps or follow the steps in the following Reference section.
  1. Uninstall IIS.
  2. In Windows Explorer, navigate to C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA.
  3. Rename the MachineKeys folder to OldMachineKeys and delete all other folders.
  4. Reinstall IIS.
  5. Start a Visual Studio 2005 command prompt and type the following: 
    • aspnet_regiis -i

Reference

For more information, see the Microsoft Support Web site's knowledge base topic, System Errors When You Open World Wide Publishing Service or Administrative Tools Services.

Unable to debug ASP.NET applications

The following shows the issue, message, solution, and reference information when ASP.NET applications cannot be debugged.

Issue

When attempting to debug an ASP.NET application, an error is returned indicating that debugging cannot be started on the Web server and a server application error occurred. When attempting to view the default home page for IIS, or a .aspx page in a Web browser, a Hypertext Transfer Protocol (HTTP) 500 code is returned. Other notable issues include the following:
  • Errors in the event log associated with the IIS server (W3SVC) referencing the message "Class not registered" or "Specified metadata was not found."
  • Unable to view COM+ applications on the Component Services dialog box.
  • Three IIS COM+ applications are not listed on the Component Services dialog box.
  • To view COM+ applications on Windows XP, click Start, Control Panel, Administrative Tools, and Component Services to open the Component Services dialog box. Click Console Root, Component Services, Computers, My Computer, COM+ Applications. Visual Studio 2005 returns the error shown in the following Message section.

Message

Unable to start debugging on the Web server. <html><head><title>Server Application Error</title></head><body><h1>Server Application Error</h1> The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more information. Please contact the server administrator for assistance.</body></html> Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You can also refer to the ASP.NET and Active Template Library (ATL) Server debugging topic in the online documentation.

Solution

If reinstalling IIS and the .NET Framework does not solve the problem, do the following steps:
  1. Start a Visual Studio 2005 command prompt (preferred) or a command prompt with the .NET Framework root folder (that is, C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) in the path.
  2. Navigate to %windir%\system32\inetsrv.
  3. Run the following command to reinstall the Distributed Transaction Coordinator:
    • command: msdtc -install
  4. On Windows XP, click Start, Control Panel, Administrative Tools, and Services to open the Services dialog box. Set the Distributed Transaction Coordinator service under the Startup Type column to Automatic, then start the service.
  5. Type the following command in the command prompt window to recreate the COM+ IIS packages:
    • rundll32 wamreg.dll, CreateIISPackage
  6. Type the following command to register ASP (not ASP.NET) with IIS. A dialog box indicates whether the registration was successful:
    • regsvr32 asptxn.dll
  7. Type the following command to restart IIS and recognize the changes:
    • iisreset

Reference

For more information, see the Microsoft Support Web site's knowledge base topic, How To Troubleshoot ASP in IIS 5.0.

Broken Map control image link

The following shows the issue and solution when there is a broken Map control image link.

Issue

The Map control shows a broken image link at run time in a browser.

Solution

Two properties on the Map control determine how a map image is generated and sent to the client browser. The UseMimeData property determines whether the Map control generates an output image on the server or streams the output image to the client. If UseMimeData is true, the Map control streams the output image to the client browser using a custom HTTP handler.

If UseMimeData is false, the Map control generates an output image on the server and stores it on disk, then the uniform resource locator (URL) to the output image is sent to the client to be rendered. If UseMimeData is false, the VirtualDirectory property must be set to a virtual directory on the Web server. The virtual directory must be a valid directory from the perspective of the Web server root or current application directory. For example, the virtual directory http://localhost/output is referenced in the VirtualDirectory property as /output.

If the virtual directory is in the Web application root folder, the initial forward slash is not required. For example, the Web application MyWebApp contains a directory named images. The full URL is, http://localhost/MyWebApp/images. If MyWebApp contains a page with a Map control, the VirtualDirectory property can reference the images directory as images.

Web application cannot access library

The following shows the issue, message, solution, and reference information when a Web application cannot access a class library.

Issue

A Web application has been created with a toolbar that accesses functionality in a custom class library. When loading in a browser, the Web application is unable to access the library.

Message

Server Error in '/<Web App Folder>' Application. Could not load file or assembly '<custom class library name>' or one of its dependencies. Access is denied.

Solution

The following are the available solutions:
  1. Disable the Microsoft Indexing Service. If the service is required, remove the temporary ASP.NET files from the folders that the index server scans. See the following Reference section for more information.
  2. Set permissions on the directory that contains the custom class library (.dll) to provide read and execute privileges to the user running the Web application. When adding a class library project as a reference to a Web site project, the class library project output (.dll file) is copied to the Bin folder in the Web application root directory.

Reference

For more information, see the Microsoft Support Web site's knowledge base topic, PRB: Access Denied Error When You Make Code Modifications with Index Services Running.

Assembly and class name are not displayed

The following shows the issue, message, and solution when an assembly and class are not displayed.

Issue

When setting the ServerActionAssembly or ServerActionClass property for a custom tool in a Web ADF Toolbar control, the assembly and class name are not displayed in the drop-down list.

Message

Could not find any resource appropriate for the specified culture or the neutral culture. Make sure ESRI.ArcGIS.ADF.Web.UI.Design.resources was correctly embedded or linked into assembly ESRI.ArcGIS.ADF.UI.WebControls at compile time, or that all the satellite assemblies required are loadable and fully signed.

Solution

The Web ADF uses reflection to discover available assemblies and class names that support the IServerActionTool interface. The Web application must have access to the assembly containing the code for the custom tool. When you build the class library, put it in a location the Web application can find. If a class library project has been added as a reference to the Web project, build the class library project first (the built assembly is placed in the Bin folder under the Web site root), then set properties on the tool.

Absolute positioning of Web controls

The following shows the issue and solution for absolute positioning of Web controls.

Issue

When adding controls to a Web page at design time, they are added in flow layout. How can this be changed?

Solution

By default, the position of controls added in Visual Studio 2005 at design time is not set. As a result, the controls are permitted to flow from left to right within a line, and from top to bottom within the page. To use absolute positioning as the default, which enables you to place controls at precise positions on the Design view surface, do the following steps:
  1. Choose Layout, Position, and Auto-Position Options.
  2. Under the HTML Designer category, choose CSS Positioning.
  3. Select the top option for changing the position when dragging and dropping controls, then select Absolutely Positioned from the drop-down list.
  4. Click OK to close the dialog box.
Controls added to new Web applications use absolute positioning. When added, they snap to the 0, 0 coordinate in the upper left corner but can be selected and dragged to the applicable location on the page.

Web ADF controls not available in Visual Studio toolbox

The following shows the issue and solution when Web ADF controls are not available in a Visual Studio toolbox.

Issue

In Visual Studio 2005, the Web ADF controls are not available in the Visual Studio toolbox.

Solution

This issue is encountered when working with Visual Studio Web Express. To add the Web ADF controls to the Visual Studio toolbar, do the following steps:
  1. Right-click the toolbar, select Add Tab, and type a name for the new tab. For example, ArcGIS Web Controls.
  2. Right-click the new tab and select Choose Items. The Choose Items dialog box appears.
  3. Click the Browse button, navigate to the location of the ESRI.ArcGIS.ADF.Web.UI.WebControls.dll, and click Open. A set of Web ADF controls is added to and selected on the Choose Items dialog box.
  4. Select the check box next to one of the items (all selected items are also checked).
  5. Click OK. The new tab contains the Web ADF controls.

ScriptManager error

The following shows the issue, messages, solution, and reference information for ScriptManager errors.

Issue

After adding a ScriptManager to a Web ADF application created with ArcGIS Server 9.2, the error messages in the following Message section are returned at run time.

Messages

The following error messages show depending on your framework:
  • JavaScript—Sys' is undefined.
  • ASP.NET—The ScriptManager is required to appear on the page before…

Solution

Enable ASP.NET AJAX for use in the Web application.

Reference

For more information, see AJAX capabilities in the Web ADF.

Serialization

The following shows the issue, message, and solution for serialization.

Issue

The session management options StateServer and SQLServer do not function when using a non-pooled map service via an ArcGIS for Server local map resource in a Web ADF application.

Message

ASP.NET: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result, non-serializable objects or MarshalByRef objects are not permitted.

Solution

Use InProc, the default session state management mode. InProc mode permits storage of an entire object in session without serialization. The other modes (StateServer and SQLServer) require that an object be .NET serializable.

Working with a non-pooled service via an ArcGIS for Server local resource requires the use of ArcObjects Component Object Model (COM) types. Since COM types are not .NET serializable, advanced session management stores that require .NET serialization cannot be utilized.

AppROT and Windows Vista

The following shows the issue, solution, and reference information for AppROT and Windows Vista.

Issue

If you are writing code that accesses the application running an object table (AppROT), be aware that your application running on Windows Vista fails if it does not have a high enough permission level.

Solution

AppROT is used as a global list of all currently running Esri ArcGIS applications. Calls made in to AppROT are out-of-process COM calls in to the AppROT.exe COM server. If in your development you are making calls in to AppROT, be aware of permission level restrictions on Windows Vista.

On Windows Vista, if the AppROT executable is run using administrator privileges, client applications running with reduced privileges will not cocreate an AppROT object due to increased security. The call in to AppROT hangs for 30 seconds, then fails.

Reference

To ensure your application runs correctly, one possible solution is to use an application manifest. For more information, see the Microsoft Developer Network (MSDN) Web site's topic, Step 6: Create and Embed an Application Manifest (UAC).