|
POST
|
Humm, it seems the portal item was corrupted at some point. I repaired it so now it should work.
... View more
07-03-2013
02:33 AM
|
0
|
0
|
1657
|
|
POST
|
The layers you pointed out do have an ObjectId but called 'FID'. You could loop on the layer fields, look for a field of type OID and then use this field as Identifier. It's not 100% guarantee but...
... View more
06-28-2013
04:05 AM
|
0
|
0
|
1439
|
|
POST
|
Running a new query returns new instances of the features so a test on layer.Graphics.Contains doesn't detect the duplicates. You can base your test on the objectID. By supposing the OBJECID of your feature layer is "ObjectId" you could try: var id = g.Attributes["ObjectId"];
if (!layer.Graphics.Any(graphic => graphic.Attributes["ObjectId"] == id)) ......
... View more
06-28-2013
03:00 AM
|
0
|
0
|
1439
|
|
POST
|
As, with an ArcGISDynamicMapServiceLayer, nothing is loaded at client side (except an image), you have to query the server to get informations about the underlying features. You can look at the Identify sample.
... View more
06-27-2013
12:06 AM
|
0
|
0
|
584
|
|
POST
|
Likely there is a mismatch in the referenced dll's. Double check that your main project and the project withthe printing controls reference the same ESRI dll's.
... View more
06-27-2013
12:03 AM
|
0
|
0
|
766
|
|
POST
|
For generating a token you can use the IdentityManager.GenerateCredentialAsync method. You can also set the IdentityManager to challenge the user on the fly (sample)
... View more
06-26-2013
11:55 PM
|
0
|
0
|
559
|
|
POST
|
You could try adding a query parameter to your Uri: .....?token=<token> Never tested though, I rarely use soap end point.
... View more
06-26-2013
11:49 PM
|
0
|
0
|
852
|
|
POST
|
Unfortunately it's a Silverlight limitation: we can't define a brush that repeats a base tile.
... View more
06-26-2013
11:46 PM
|
0
|
0
|
776
|
|
POST
|
Great you got this working:) Another thing I would like to know for setting own proxy do we need to have online premium service account or it is free of cost? The proxy code sample is free. Then to access to the services, the proxy doesn't change anything, the cost is only depending on the underlying services. So it's free if you access public KML files.
... View more
06-26-2013
11:42 PM
|
0
|
0
|
1368
|
|
POST
|
To programmatically generate a token, it seems that we must set the IdentityManager.Current.ChallengeMethod to the proper method which can give user/pw, and then call GenerateCredentialAsync from within the challenge method. You can also call GenerateCredentialAsync out of the challenge method and then call AddCredential to register this credential with the IdentityManager. Once done, the IdentityManager will automatically use this credential to access to the specified arcgis resource (portal or server). Example of code snippet: private Task InitIdentityManager()
{
var tcs = new TaskCompletionSource<bool>();
IdentityManager.Current.TokenGenerationReferer = "arcgis.com";
IdentityManager.Current.ChallengeMethodEx += SignInDialog.DoSignInEx; // activate the IM with the standard SignInDialog
IdentityManager.Current.GenerateCredentialAsync("http://www.arcgis.com/sharing/rest", "username", "password", (crd, error) =>
{
if (crd != null)
{
IdentityManager.Current.AddCredential(crd);
tcs.SetResult(true);
}
else
tcs.SetException(error ?? new Exception("Unknown error"));
});
return tcs.Task;
} Instead of using GenerateCredentialAsync, you can also call GetCredentialAsync in order to challenge the user using the toolkit signInDialog. Something like: IdentityManager.Current.GetCredentialAsync("http://www.arcgis.com/sharing/rest", true, (crd, error) =>
{
if (crd != null)
IdentityManager.Current.AddCredential(crd);
});
... View more
06-26-2013
11:35 PM
|
0
|
0
|
843
|
|
POST
|
Without setting the referrer, there are always 2 token requests when obtaining a token. The first fails saying Referrer must be specified. Then IdentityManager must recognize that and it adds Client=requestip, which gets the token. That's normal. If there is no default referer, we first try to generate a token without any option i.e a short lived token. But arcgis.com doesn't support short lived token yet. So we catch the error and try to generate a token for the current IP. However, it does fail 25-50% of the time on that second request too. Interesting. I never observed this case. Might be due to your firewall config and an arcgis.Com change I never noticed. Anyway, it's a good practice to use a referer with OnPremise and OnLine portals in order to avoid issues. With the referrer set, we only get 1 token request, because the first request has client=referrer and referrer=arcgis.com in the request. I tried 20+ times and I never got the failure I've been seeing, so this seems very promising. Great 🙂 What is the recommended value for referrer since this isn't a web-based application we're using? I didn't get a solid feel for that based on the API documentation. With the WPF API (unlike Silverlight and WinPhone API) you can use the referrer you want (e.g your application name). Once a token has been generated for a specific referer, the Identity Manager will automatically add the referrer as header of the requests that need the token (you should be able to observe that with fiddler). Hope this helps.
... View more
06-14-2013
08:19 AM
|
0
|
0
|
1201
|
|
POST
|
What kind of Challenge method did you set? Is it a challenge method that generates a token progammatically or is there an UI? From your description, it looks as if a token was generated automatically by the challenge method but for a wrong user. In this case, the IM gets in a loop to give a chance to the user or to the program behind the challenge method to log in with the right user. However the loop is limited to 20 tentatives then the request fails (as if the user cancelled the sign in dialog). Note: if not already done, we can try to set a referer for the token generation. Something like IdentityManager.Current.TokenGenerationReferer = "arcgis.com". Though, that should not explain the error you reported.
... View more
06-13-2013
11:33 AM
|
0
|
0
|
1201
|
|
POST
|
Could you use fiddler to look at the error returned by the service at step 4)? That could give a clue. Note that if you access to hosted or federated services, you have to set a default referer for the token generation (something like IdentityManager.Current.TokenGenerationReferer = "arcgis.com") because hosted and federated services don't support tokens associated to an IP address. It's even a good practice to set a referer as soon as you access to a portal.
... View more
06-13-2013
11:20 AM
|
0
|
0
|
888
|
|
POST
|
By default the legend tree nodes are expanded. You can change this behavior either by restyling the legend control, or, likely easier, by code on the event Legend.Refreshed: private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e)
{
// Collapse all map layers in the legend.
e.LayerItem.IsExpanded = false;
// Collapse all sublayers
if (e.LayerItem.LayerItems != null)
foreach (var sublayerItem in e.LayerItem.LayerItems)
sublayerItem.IsExpanded = false;
}
... View more
06-13-2013
09:40 AM
|
0
|
0
|
971
|
|
POST
|
Did you try to subscribe to Editor.EditCompleted event and in the Handler, test if action is 'Add' and update your attribute there?
... View more
06-13-2013
09:32 AM
|
0
|
0
|
672
|
| 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
|