Sign In Dialog Online
This sample demonstrates using the Toolkit.SignInDialog with the IdentityManager to prompt a user for credentials. The sample contains a Map with one layer that is token-secured. The IdentityManager.Current.Challenge method is set to the SignInDialog.DoSignIn method that is provided in the Toolkit. This provides the prompt dialog experience for the user. It reprompts the user if invalid credentials are supplied.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.SignInDialogSimple" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/client/2009"> <Grid x:Name="LayoutRoot"> <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" WrapAround="True"> <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer" /> <!-- username: user1 | password: pass.word1 --> <esri:ArcGISTiledMapServiceLayer ID="SecureLayer" Url="http://serverapps10.esri.com/arcgis/rest/services/GulfLawrenceSecureUser1/MapServer" InitializationFailed="Layer_InitializationFailed" Initialized="Layer_Initialized" /> </esri:Map> </Grid> </UserControl>
5/16/2014