Silverlight Tag
It was great to see all of you at this year’s Developer Summit! Hopefully you were able to come by the Islands, Meet the Teams, or attend a Technical Workshop and chat with one of us:

We received lots of good feedback from you this year, and we are pleased to announce that v3.0 Final of the ArcGIS API for Silverlight will support development with both Silverlight 4 and Silverlight 5!
In addition to talking with you about your work and getting feedback, one of our goals every year at the Developer Summit is to provide Technical Workshops with valuable information, best practices, and samples that you can take back with you. If you attended the Developer Summit but missed any of the Silverlight/SharePoint/Windows Phone presentations, or were unable to attend and would like the info, here are a few links you may find of interest:
The components included in ArcGIS for SharePoint – the ArcGIS Map Web Part, ArcGIS Geocoding Workflow, and ArcGIS Location Field – each reference services from ArcGIS Online out-of-the-box. By default, they access these services over http. But due to the cross-scheme restrictions of Silverlight, the default use of http introduces problems when ArcGIS for SharePoint is used within a SharePoint site that employs Secure Sockets Layer (SSL or https) protection. So when loading the Map Web Part on an https site, the following prompt will be shown:
We’re pleased to announce the localized releases of ArcGIS Viewer for Silverlight 1.0.1 and ArcGIS for SharePoint 2.1.1. These releases add support for Arabic, Chinese (Simplified), English, French, German, Italian, Japanese, Portuguese (Brazilian), Russian, and Spanish to both products.
For the ArcGIS Viewer for Silverlight, simply download and run the setup for a particular language. Then text within the Application Builder and all deployed Viewer applications will be shown in that language.

We are pleased to announce the release of version 1.0.1 of the ArcGIS Viewer for Silverlight. This is a quick-turnaround maintenance release to fix critical bugs that have been identified since the release of version 1.0. The Viewer team has worked hard to address these issues quickly in order to minimize their impact on your Silverlight Viewer applications. The issues addressed include:
- ArcGIS Viewer for Silverlight Applications do not load on Windows XP clients if data containing characters with diacritical marks (e.g. ü, ä, ñ, etc) is included in the map
- Several localization issues related to the forthcoming localized releases of the Viewer
Version 3.0 beta 2 of the ArcGIS API for Silverlight and the ArcGIS Runtime SDK for Windows Phone is now available for download from the Beta Community Web site. You’ll need to login with an Esri Global account and walkthrough an initial survey to gain access. Once in the Beta Community you can register for any of the products listed.
Here are a few highlights of what’s new in the 3.0 beta 2 APIs:
- New resource centers for the Silverlight and Windows Phone APIs are available to the public.
- Silverlight 5 is now required to develop Silverlight Web applications. Silverlight 4 is no longer supported. (Silverlight only)
- Silverlight project templates have been removed from the install. They will be available online with 3.0 final. (Silverlight only)
- Support for new ArcGIS Server 10.1 beta 2 services and capabilities:
- Change layer rendering, layer order, or add layers on the fly in map services
- Generate data classifications on the server for layers in map services
- Use enhanced query options to order results and generate statistics
- Track user identity of edits and use ownership to limit edits to a layer in a feature service
- Support for geometry with Z and M values
- Generate printable output using the new PrintTask
- Query and edit support versioned layers in a geodatabase
Continue reading »
We’re very excited to announce the final releases of the ArcGIS Viewer for Silverlight 1.0 and ArcGIS for SharePoint 2.1. For both products, this is a major release that is packed with lots of great functionality. Both products allow you to interactively create and configure web mapping applications without writing code. You can easily configure the map, tools, and look and feel of each application, leveraging ArcGIS Server map and geoprocessing services. The Viewer creates applications as standalone websites, while ArcGIS for SharePoint integrates your web applications into SharePoint by hosting them in the Map Web Part.
With this version, you can:
Version 2.4 of the award-winning ArcGIS API for Silverlight, WPF, and Windows Phone is now available for download on the ArcGIS Resource Center. This is a simple quality release across all three platforms that includes fixes for the following issues:
- When clustering:
- Selection color does not change when non-clustered graphics are selected
- Non-clustered graphics with only a symbol defined (no renderer) are not displayed
- Hit test on graphics returns a copy of the graphic instance
- Serializing FeatureSet with no feature or features with no geometry creates invalid JSON
- FeatureSet.ToJson() can only be called on the UI thread
- ArcGISDynamicMapServiceLayer not visible when crossing the dateline
- Change GpsLayer accuracy from default to high
- Namespace clash on CodedValueSource between Toolkit and WebMap assemblies
- MapTips close unexpectedly when hide delay timeout set on two or more layers.
The 2.4 APIs are being released in concert with the ArcGIS Viewer for Silverlight 1.0 and ArcGIS for SharePoint 2.1 so that application builders and developers working with these products will be able to benefit from these fixes. The extensibility API included with both the Viewer and SharePoint is built on version 2.4 of the ArcGIS API for Silverlight.
Enjoy!
The ArcGIS Silverlight, WPF, and Windows Phone Development Teams
The Image Service Explorer is a sample web application that allows you to explore image services in web environment. This Silverlight sample has been very popular, and many new features have been added, and therefore we has decided to upload the latest sample for the Image Service Explorer 1.1. See the details in the link or within the Readme.txt file for more information.
The Image Service Explorer sample has been created and updated by Wenxue Ju.
Configuring ASP.NET forms-based authentication for the Application Builder and published ArcGIS Viewer for Silverlight applications.
ASP.NET forms-based authentication provides a simple way to present a login page to your user prior to allowing access to the Application Builder or a published Viewer application. The example in this topic presents a simple implementation of ASP.NET forms authentication that requires a user to enter a user name and a password. After the user’s credentials have been validated, the ASP.NET web form redirects to the application.
In the example below, the client requests a protected resource, Default.aspx. There is only one user who can gain access to the protected resource: user1, with a password of password. The user name and password are hard-coded into the Login.aspx file.
For more information on ASP.NET forms-based authentication, see:
- How to: Implement Simple Forms Authentication
- How To Implement Forms-Based Authentication in Your ASP.NET Application by Using C#.NET
- Securing your Silverlight Applications
- Forms Authentication Using An XML Users File
Securing the Application Builder and published Viewer application
The process for using forms-based authentication to secure both the Application Builder and a published Viewer application is very similar. The instructions presented here are applicable to both scenarios.
To secure the Application Builder and a published Viewer application with forms-based authentication, three files are required: the Web.config file, a Login.aspx page, and a Default.aspx page. These files need to reside in the application root directory, whether that is the Builder root directory (e.g. \Inetpub\wwwroot\Builder) or the Viewer application root directory (e.g. \Inetpub\wwwroot\Apps\Earthquakes).
Application Builder
For the Application Builder, the Web.config and Default.aspx files already exist in the root directory, but need to be modified. The Web.config file will be modified using IIS Manager. The Default.aspx file will be modified using a basic text editor. The Login.aspx file does not yet exist, so you will create it using a basic text editor.
Published Viewer application
For a published Viewer application, there is an existing Index.htm file in the root directory that will become the Default.aspx page. The Web.config file will be created using IIS Manager. As with the Application Builder, the Login.aspx file will be created using a basic text editor.
Web.config
- Open Internet Information Services (IIS) Manager and navigate to the virtual directory containing your application (for example, Sites>Default Web Site>Builder). If you are configuring security for a published Viewer application, right-click the folder containing the application and click Convert to Application. Click OK on the Add Application dialog.
- Double-click Authentication in IIS Manager and set Forms Authentication and Anonymous Authentication to Enabled.
- Return to the virtual directory and double-click .NET Authorization under the ASP.NET heading. Under Actions on the right side of the IIS Manager window, click Add Deny Rule.
- In the Add Deny Authorization Rule dialog, select Specified users and type a question mark (“?”). Click OK. This denies access to Anonymous users.
Note: If you are unable to use IIS Manager, you may copy and paste the following text in to the web.config file:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <authentication mode="Forms" /> <authorization> <deny users="?" /> </authorization> </system.web> </configuration>
Default.aspx
- If you are configuring security for a published Viewer application, locate the Index.htm file in the root directory and rename this file to Default.aspx before continuing with these steps. If you are configuring security for the Application Builder, the Default.aspx file already exists in the root directory.
- Open the existing Default.aspx file in Notepad or a similar text editor. The Default.aspx file is the requested, protected resource. In the case of the Application Builder, the Default.aspx is the default Welcome page that is shown when the Application Builder is started.
- Add the following header at the top of the Default.aspx file to specify the programming language that is used for the server-side code:
<%@ Page Language="C#" %>
- Add a Label for the Welcome message and a Button to allow the user to Sign Out of the application. Place the elements shown below directly above the <div id=”silverlightControlHost”> element. The Welcome message and the Sign Out button will display at the top of the Application Builder.
<asp:Label ID="Welcome" runat="server" /> <asp:Button ID="Submit1" OnClick="Signout_Click" Text="Sign Out" runat="server" />
- Add the following script after the closing </head> element and before the opening <body> element. This script displays a Welcome message to the user and redirects the user to the main Login page when they click the Sign Out button.
<script runat="server"> void Page_Load(object sender, EventArgs e) { Welcome.Text = "Hello, " + Context.User.Identity.Name; } void Signout_Click(object sender, EventArgs e) { FormsAuthentication.SignOut(); Response.Redirect("Login.aspx"); } </script>
Login.aspx
The Login.aspx file does not exist in either the root directory of the Application Builder or a published Viewer application. There are many options for designing a login page, but the following is an example of a simple form containing two text boxes (User Name and Password) and a Submit button that is presented to the user. The user enters the user name and password, and then clicks Submit. The code then compares this name and password to the pair that is hard-coded into the Login.aspx file. If the comparison succeeds, the user is connected to Default.aspx. If it fails, an error message is presented to the user.
- Open Notepad or a similar text editor and copy the text below into the empty file.
- Save the file as Login.aspx in the Application Builder or published Viewer application root directory.
<%@ Import Namespace="System.Web.Security" %> <html> <head> <style type="text/css"> .auto-style1 { font-family: "Microsoft Sans Serif"; } .auto-style3 { font-size: small; } .auto-style4 { font-size: small; font-family: "Microsoft Sans Serif"; } .newStyle1 { font-family: "Microsoft Sans Serif"; padding: inherit; margin: auto; } </style> </head><script language="C#" runat="server">void Logon_Click(Object sender, EventArgs e) { if ((UserName.Value == "user1") && (Pass.Value == "password")) { FormsAuthentication.RedirectFromLoginPage(UserName.Value, Persist.Checked); } else { Msg.Text = "Invalid Credentials: Please try again."; } } </script> <body bgcolor="#FFFFFF"> <form runat="server" class="auto-style1"> <h3 class="auto-style1">ArcGIS Viewer for Silverlight</h3> <table> <tr> <td class="auto-style4" style="height: 30px">User:</td> <td style="height: 29px"> <input id="UserName" type="text" runat="server" class="auto-style3"/> </td> <td style="height: 29px"> <asp:RequiredFieldValidator ControlToValidate="UserName" Display="Static" ErrorMessage="Cannot be empty." runat="server" Font-Size="Small"/> </td></tr> <tr> <td class="auto-style4" style="height: 30px; bottom: 5px;">Password:</td> <td style="height: 29px"> <input id="Pass" type="password" runat="server"/> </td> <td style="height: 29px"> <asp:RequiredFieldValidator ControlToValidate="Pass" Display="Static" ErrorMessage="Cannot be empty." runat="server" Font-Size="Small"/> </td> </tr> <tr> <td style="height: 29px; top: auto;" class="auto-style1"> <span class="auto-style3">Remember me</span>: </td> <td style="height: 28px"> <asp:CheckBox id="Persist" runat="server" autopostback="true" Font-Size="Small"/> </td> <td style="height: 28px"></td> </tr> </table> <asp:Button ID="Submit1" OnClick="Logon_Click" Text="Log On" runat="server" /> <p> <asp:Label ID="Msg" ForeColor="red" runat="server" /> </p> </form> </body> </html>
This post provides an example of using ASP.NET forms-based authentication to secure the ArcGIS Viewer for Silverlight. ASP.NET forms-based authentication is a common way to secure Silverlight applications that involves validating a user’s credentials (user name and password) and then redirecting to the application. Both the Application Builder and resulting Viewer applications may be secured, and as demonstrated here, the process is essentially the same for each. The links listed at the beginning of this post provide additional information on securing Silverlight applications and implementing forms-based authentication.
Katherine Dalton
Esri Product Engineer
ArcGIS Viewer for Silverlight
Free Live Training Seminar on ArcGIS Viewer for Silverlight
Thursday, December 8, 2011
- 9:00 a.m. PST (US and Canada)
- 11:00 a.m. PST (US and Canada)
- 3:00 p.m.(US and Canada)
The ArcGIS Viewer for Silverlight is a ready-to-deploy, configurable client application that is built on the award winning* ArcGIS API for Silverlight. It includes an Application Builder that enables users to easily and quickly deploy a custom web map without programming or configuration file editing. It is an ideal solution for novice users who want to create web mapping applications. The Viewer application is designed to work with ArcGIS Server and ArcGIS Online Web services, and fully supports the new capabilities offered at ArcGIS Server 10. *2011 Visual Studio Magazine Readers Choice Winner for Mapping & GIS Components
Update
The ArcGIS Viewer for Silverlight live training seminar is now available online:
Introduction to ArcGIS Viewer for Silverlight

