I am in the process of implementing editing within the SL API 2.0, using AGS 10 and SL4. I have built the application and I can edit the layers I need to edit within the UI. Now the fun begins--locking things down so only the people I want to have edit rights can access the service. I have implemented SSL through IIS and set the appropriate permissions on the services I want users to be able to edit. Here are my questions: 1. Do all Tokens time-out or can you set a token not to expire? 2. Is there a recommended method of passing a user name and password to the Token service? I have found the following example, https://myserver.example.com/arcgis/tokens?request=gettoken&username=myuser &password=secret1&clientid=ref.myserver.example.com&expiration=1440 but I am trying to come up with a work flow of how to submit this information at runtime, then pass the Token key as a parameter for the service.
I'm not sure if you can create non-expiring tokens (since it would be less secure) - but perhaps you can. I apologize that I can't offer you any help with that, but I'd be curious to know the answer.
Regarding your second point, I've used a proxy page (as described in the API help at http://help.arcgis.com/en/webapi/silverlight/help/Secure_services.htm) to handle interaction with the token service. That way, the credentials are all kept on the server, and are not embedded in your SL app (nor supplied by the users themselves). I don't know if this will help given your requirements, but if you haven't looked at it yet, it might be of use.
I decided to go down proxy path. This option worked best for our environment due to the fact that all the credentials are stored on the server. That being said, I did have a few issues with the silverlight proxy provided on the silverlight api resources page. I ended up logging a call with tech support and by using a different version of the proxy I was able to get everything working. I did contact the engineer I worked with to resolve my issues and he will be posting his version of the proxy in this thread soon.
Have anyone else been having issues with the proxy file that is on the Silverlight API reference page?
I don't recall having any problems. (I ran into other proxy-related issues, like a problem with the FeatureLayer's use of the proxy URL at 2.0 beta, but I had no problems with the actual proxy page itself, from what I could tell.)
Paul, out of curiosity, what problems were you having? It might be useful to know so I could switch to this other proxy page if I need to.
Paul, out of curiosity, what problems were you having? It might be useful to know so I could switch to this other proxy page if I need to.
Hi Brooks, We never really identified the specific issue, but to summarize, I was not able to get the proxy to work by passing either a token or user name and password credentials within the proxy.config file. I could get everything working by hard coding the token value into the SL application but it would not work in the proxy.
I did take a close look at the two proxy config files and there were some differences as far as the tags that were used to define your parameters. The SL version used <serverItem /> and the other version used <serverUrl />. In my discussions with the ESRI engineer, he did mention that he had made quite a few modifications to the proxy.ashx file, but I did not spend any time comparing the changes.
For most users the proxy file referenced earlier in this thread may work fine. If folks do start to experience issues I just wanted to post this out there to save you guys some time in troubleshooting the issues.
Thanks, Paul. I'll definitely keep the newer proxy page in mind, in case we notice similar oddities when using the original one. And thanks again for helping to get the new page posted on the forum, for future use by other folks.