Welcome to ESRI Blogs

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

Published Thursday, September 25, 2008 9:32 AM by sterlingdq
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

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

I'm trying to implement this on my development MOSS 2007 box which also has VS2008 installed on it. When I debug the the web part under VS2008, it works fine. I've moved the dll to the _app_bin directory and added the Basic Map Part to a new web page. When I try to configure the web part to point to the resources as defined in the accompanying Word document, the web part crashes and gives the dreaded "Unknown error occurred". I've put VS2008 on the SharePoint process, and found that the m_adfMap.Reset() call is crashing, and it appears the LayerDefinitions are null. Any ideas why this would work (same machine) as a standalone web part under VS2008 (using the CustomControlsWebSite) but not in SharePoint?
Tuesday, October 14, 2008 1:47 PM by Dan

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

This issue was resolved in a forum thread: http://forums.esri.com/Thread.asp?c=158&f=2276&t=261788 Thanks, -Rex
Tuesday, October 21, 2008 11:33 AM by rexhansen

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

The issue of TOC presented in ArcGIS Server 9.2 (Performance is decreased)is presented in Sharepoint WebPart too. Any idea to resolve it?
Wednesday, November 05, 2008 9:17 AM by Andres

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

Hi Andres, Can you provide some additional information on the TOC performance problem you're referencing? We resolved a number of issues with TOC performance during the 9.2 service pack cycles (namely sp 3). Do you have the latest sp for 9.2 installed (sp 6)? On a side note, I would strongly recommend using 9.3 if you need to create custom Web Parts for SharePoint. Thanks, -Rex
Friday, November 07, 2008 2:56 PM by Rex Hansen

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

Hi Rex, We have developed two connectable webparts in 9.2 with SP4. When we use Identify tool, the results datatable will be passed to second webpart. We used Connectionprovider and ConnectionConsumer concept to connect both the webparts. I have set EnablePostback to True for identify tool. It is working fine for 9.2 but not in 9.3. Is there any difference in 9.3? If yes, could you please suggest any additional steps to de implamented for complete post back? Regards, Venkat
Tuesday, November 18, 2008 1:37 AM by Venkata Rao K

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

Hi Rex, we working in 9.3. We developed one webpart to MOSS 2007 y WSS 3.0 It's work fine in anywere aspx page outside from sharepoint. But if we using it into sharepoint the TOC Performance is decreased. I supose "It's the same issue in 9.2 with aspx", now is presented into sharepoint. Thanks a lot.
Monday, November 24, 2008 11:09 AM by Andres

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

Hi!! I have idea to develop web part of room plan. This is the requirement. User should enter location and item detail of room. Those data should be store in xml file. Then room plan graphic is automatically created. Can any one know how to draw plan (image) using web part..?? Please give me some idea to start this web part . thanX. regards, nalaka
Monday, January 19, 2009 8:25 PM by nalaka

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

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

Tuesday, August 11, 2009 11:56 PM by kvenkatj

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

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

Tuesday, August 11, 2009 11:56 PM by kvenkatj

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

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

Tuesday, August 11, 2009 11:57 PM by kvenkatj

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

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

Monday, October 19, 2009 3:03 AM by rajeshc5

Leave a Comment

(required) 
required 
(required)