|
POST
|
No idea about your issue, but if you don't need the shapefile at client side, why not create one GP tool chaining your 2 tools at server side?
... View more
06-23-2012
04:02 AM
|
0
|
0
|
568
|
|
POST
|
At first glance your code looks good. The FeatureLayerFiltering sample is using the Geometry property to make a spatial query and looks working. What is not working in your case? Try to use fiddler and look at the requests sent to the server, that might give a clue.
... View more
06-23-2012
04:00 AM
|
0
|
0
|
615
|
|
POST
|
Your services seems down for now, so I can't provide you a working example with them. But my previous test was simply based on the EditorWidget sample after replacing the ESRI services by yours.
... View more
06-23-2012
03:17 AM
|
0
|
0
|
1254
|
|
POST
|
I added a button that strung the login prompt to itself instead of the mainpage initialization. It works now (though i have no clue why this would change things), No clue either. From my tests, it's working at initialization as well. I just realized this doesn't work with more than one featurelayer on the map . I don't understand why that wouldn't work with more than one layer. What doesn't work?
... View more
06-23-2012
03:12 AM
|
0
|
0
|
1335
|
|
POST
|
Sorry, I'm really not trying to be a bother, but how would I do those other steps You are welcome:) The following code should give you the general idea. As there is only one page in this application, the Map is collapsed to avoid the layers be loaded before the login ends up. In a more complete web application, you might have a specific startup page that is displayed before navigating to the map page. public partial class MainPage: UserControl
{
public MainPage()
{
InitializeComponent();
MyMap.Visibility = System.Windows.Visibility.Collapsed; // so the map is not loaded before we get a credential
//// Login at start up : likely the signin dialog has to be customized not to reference the service
SignInDialog.DoSignIn("http://<server>/arcgis/rest/services", (crd, error) =>
{
if (crd != null)
IdentityManager.Current.AddCredential(crd);
MyMap.Visibility = System.Windows.Visibility.Visible; // now load the layers
});
IdentityManager.Current.ChallengeMethod = Challenge;
}
private static void Challenge(string url,
Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions options)
{
var crd = IdentityManager.Current.FindCredential(url);
if (crd != null)
{
// Allow one login only
callback(null, new Exception(string.Format("{0} has no access to {1}", crd.UserName, url)));
}
else
{
// Give a second chance if the user cancelled the signin dialog at start up (optional: might be removed)
SignInDialog.DoSignIn(url, callback, options);
}
}
... View more
06-22-2012
07:07 AM
|
0
|
0
|
1335
|
|
POST
|
Looks like you forgot the first steps; - Ask the user to sign In (using the toolkit SignInDialog or your own dialog) - Get the credential object (returned by the signInDialog or by using IdentityManager.Current.GenerateCredentialAsync if you develop your own dialog) - Add this credential to the IdentityManager (using AddCredential) - ..... 🙂 With that Challenge method, the signin dialog is never initialized from the IdentityManager (that's the goal). So if you don't do it at application startup, it's never done. Or try the first option: private static void Challenge(string url,
Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions options)
{
var crd = IdentityManager.Current.FindCredential(url);
if (crd != null) // Already logged : allow one login only
callback(null, new Exception(string.Format("{0} has no access to {1}", crd.UserName, url)));
else
SignInDialog.DoSignIn(url, callback, options);
}
... View more
06-22-2012
06:16 AM
|
0
|
0
|
1335
|
|
POST
|
I tested with your services and I didn't reproduce the issue. Have you set correctly the LayerIDs of the Editor Widget?
... View more
06-22-2012
05:32 AM
|
0
|
0
|
1254
|
|
POST
|
Hi Joe, Not sure if it's your case, but that might happen when changing the target SL version of a project when some cached dlls are still used. Double check the version and the location of your referenced dll's. If your target SL5, the ESRI dlls should be the version 3.0.0.388 coming from the Silverlight5/3.0 directory and the system dlls should be version 5.0.5.0. Then : - clean your solution - remove obj and bin directories - exit visual studio - try again Hopefully this will work :confused:
... View more
06-22-2012
05:07 AM
|
0
|
0
|
810
|
|
POST
|
Could you share the Url of the request returning this error? This might give a clue. Thanks
... View more
06-22-2012
05:02 AM
|
0
|
0
|
552
|
|
POST
|
The Challenge method is called each time an authorization error occurs even if the user is already logged for another service. That covers the cases where you want to access services with different logins e.g. access service1 with user1 login and service2 with user2 login (sidenote : though only one login is possible for the arcgis.com hosted services). If you want to change this behavior, one option is to customize the ChallengeMethod and refuse to initiate a new SignInDialog if a credential is already available. Something like: public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
IdentityManager.Current.ChallengeMethod = Challenge;
}
private static void Challenge(string url,
Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions options)
{
var crd = IdentityManager.Current.FindCredential(url);
if (crd != null) // Already logged : allow one login only
callback(null, new Exception(string.Format("{0} has no access to {1}", crd.UserName, url)));
else
SignInDialog.DoSignIn(url, callback, options);
} Though this method has one disavantage : as you don't control the order the challenges are initiated, the user might get a challenge for "Feature1" first and will have to cancel this challenge (this undefined order might also explain your results). To avoid that, a workaround might be to add by code the second layer in the map when the first layer is initialized. So you are sure the first challenge is for the first layer. Another option (and likely better) is you to manage the SignIn process before the map is displayed (at the start up of the application). Steps might be: - Ask the user to sign In (using the toolkit SignInDialog or your own dialog) - Get the credential object (returned by the signInDialog or by using IdentityManager.Current.GenerateCredentialAsync if you develop your own dialog) - Add this credential to the IdentityManager (using AddCredential) - Initialize the IdentityManager with a Challenge method refusing all new challenges, so only the previously added credential will be used - Create your map Example of such challenge method: private static void Challenge(string url,
Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions options)
{
callback(null, new Exception(string.Format("No access to {0}", url)));
} Hope this helps.
... View more
06-22-2012
05:00 AM
|
0
|
0
|
1335
|
|
POST
|
The ScaleBar has been removed from the Client assembly and replaced by the ScaleLine in the Toolkit assembly. You'll find the removed items and the complete list of changes here.
... View more
06-20-2012
10:51 PM
|
0
|
0
|
1524
|
|
POST
|
ArcGIS API for Silverlight V3.0 is now live, the main links are: Annoncement Overview and Concepts Interactive Samples API Reference Download and Install Enjoy!
... View more
06-20-2012
10:44 PM
|
0
|
3
|
1179
|
|
POST
|
Is it possible to print Map in A3, A2 ,A1 etc. I tried the sample 'Client side Map Printing to scale over multi pages' its working fine for A4 paper Sure. When printing and selecting the printer, use the 'Preferences' dialog to change the printer parameters : Orientation, Paper size..... The print will use these parameters that will become the default for the print preview dialog. From where can i find the latest sample for printing in silverlight 4 api version 2.2. Latest sources for SL4 are here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3 The version adapted for SL5 is given in this thread (second post).
... View more
06-19-2012
07:42 AM
|
0
|
0
|
1265
|
|
POST
|
You pointed out an API difference between the 3.0 prerelease and the 3.0 release. The interactive SDK has already be updated in 3.0 Release that is not available publicly yet but that should happen soon. Meanwhile I suggest you comment out the IdentityManager samples (or adapt them to old API SetToken instead of RemoveCredential). Sorry for the inconvenience.
... View more
06-18-2012
10:41 PM
|
0
|
0
|
673
|
|
POST
|
Legend.Refreshed event is fired by layer: e.LayerItem is the main layer having the legend refreshed (i.e the ArcGISTiledMapServiceLayer) and e.LayerItem.LayerItems is the collection of sublayers. The confusion is that often one sublayer has the same name as the layer. For example in case of the 'World Imagery' layer the sublayers are World Imagery, Low Resolution 15m Imagery, Low Resolution 15m Imagery, High Resolution 60cm Imagery and High Resolution 30cm Imagery. So your code is removing the sublayer 'World Imagery' and keeps the 3 others. If you want to remove all sublayers of any ArcGISTiledMapServiceLayer, you can use code such as : private void Legend_Refreshed(object sender, ESRI.ArcGIS.Client.Toolkit.Legend.RefreshedEventArgs e) { if (e.LayerItem.Layer is ArcGISTiledMapServiceLayer) e.LayerItem.LayerItems = null; }
... View more
06-18-2012
09:00 AM
|
0
|
0
|
1082
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|