Using 9.3 Web ADF controls in an ASP.NET Web Part and SharePoint 2007

My previous post about integrating 9.2 Web ADF controls in ASP.NET Web Parts discussed a number of workarounds required to successfully utilize ADF controls within a Web Part. For 9.3 the ArcGIS Server .NET development team took some time to evaluate and fix any issues encountered while using ADF controls in a custom user control, composite control or ASP.NET Web Part. We tested Web Part deployment within SharePoint 2007 and confirmed that it worked without any ADF specific workarounds. As a result, the 9.3 Web ADF provides a solid foundation for integrating GIS components in Web Parts designed for SharePoint deployment.

Click here to download a comprehensive Web ADF-Web Part sample (C# and VB.NET). The sample code includes two projects: a class library which contains Web Parts, and a Web application to assist in deployment and testing. The sample also includes a ReadMe.txt to get started and a Word document which steps through the SharePoint 2007 deployment process for ASP.NET AJAX-enabled Web Parts.

The class library project (ADFWebPart) contains two Web Parts: MapWebPart and MapGridViewWebPart. MapWebPart contains MapResourceManager, Map,Toolbar, and Toc controls. This sample illustrates how to add, structure, and initialize the aforementioned controls, add a custom tool, and expose properties for use in SharePoint.

MapGridViewWebPart contains a MapResourceManager and Map. It also contains an UpdatePanel with a GridView. It requires that a ScriptManager be in the page to enable asynchronous updates of the GridView (via the UpdatePanel).

This sample illustrates how to work with interactive graphics in the client via a map and table. A selection set is generated from a feature layer in an ArcGIS Server map service and managed as a Web-tier graphics layer. The graphics layer is rendered on the client using Web ADF JavaScript graphic features. Attributes of the selected set of features are displayed in the GridView. The visible fields and alias can be explicitly defined. Hovering over a row in the table will highlight the corresponding graphic feature in the map. Clicking on the row will zoom or pan to the feature.

All properties for setting the dynamic resource, data layer for display, feature limits and field aliases are public and presentable within SharePoint. An ArcGIS Online cached map service (StreetMap) is used as a background map resource to provide spatial context.

The following screenshot provides an example of both Web Parts deployed within SharePoint 2007.

 Web Parts in Share Point

To utilize either Web Part outside of SharePoint or to test before SharePoint deployment, use the file system Web application (CustomControlsWebSite) included with the sample. The Web application contains a simple aspx page designed to emulate a runtime scenario where an end user wants to add a Web Part within the current session. To personalize the page (e.g. add a Web Part at runtime) the current session must be associated with an authenticated user. By default, a file system Web site will use integrated authentication. If deploying as a Web application in IIS, you will need to disable anonymous access to the Web application in IIS. Enabling integrated authentication may offer the easiest solution since you do not need to configure or explicitly define authentication details; instead the authenticated user will be the user account under which the client (browser) is running.

The default personalization provider for ASP.NET 2.0 is SQL Express. If you do not have SQL Express installed, a personalization store will not be created (upon initial execution of the application) and an error will be returned when attempting to add the custom Web Part to the page at runtime. To alleviate this requirement, the Web site uses a custom personalization provider that stores information in text files. The code, markup, and discussion for this technique is provided in the Microsoft article Web Parts Personalization Providers.

Contributed by Rex Hansen of the ArcGIS Server .NET software development team

This entry was posted in Services and tagged , , , . Bookmark the permalink.

Leave a Reply

5 Comments

  1. rexhansen says:

    This issue was resolved in a forum thread: http://forums.esri.com/Thread.asp?c=158&f=2276&t=261788

    Thanks,
    -Rex

  2. kvenkatj says:

    Hi Rex,

    I have listed out the limitations of web adf to use in Moss 2007.

    Can you please provide / update information regarding the limitations and when ESRI is planning to address them.

    Regards,
    Venkat

  3. kvenkatj says:

    Hi Rex,

    I have listed out the limitations of web adf to use in Moss 2007.

    Can you please provide / update information regarding the limitations and when ESRI is planning to address them.
    http://venkatgisesri.blogspot.com/
    Regards,
    Venkat

  4. kvenkatj says:

    Hi Rex,

    I have listed out the limitations of web adf to use in Moss 2007.

    Can you please provide / update information regarding the limitations and when ESRI is planning to address them.
    http://venkatgisesri.blogspot.com/
    Regards,
    Venkat

  5. rajeshc5 says:

    Hi Rex,
    We are facing problems with zoom tools while within sharepoint. can you please help. The issue is posted on ESRI forums.

    http://forums.esri.com/Thread.asp?c=158&f=2276&t=293365&mc=0
    regards.
    Rajesh