Advertisement

Silverlight and ADO.NET Data Service proxy generation

One of the nice little additions to the data client services in Silverlight 2 is the removal of the need to drop out of Visual Studio to do some proxy code generation.  Prior to Silverlight 2 release, if you wanted to consume an ADO.NET Data Service (the artist formerly known as Astoria), you had to drop into a command line and execute something like:

   1: datasvcutil.exe /out:"MyDataService.cs" /uri:"http://foo.com/MyDataServiceEndpoint.svc"

While that isn’t difficult, it just wasn’t convenient as a developer productivity workflow.  I mean who wants to have to click and type more than you have to, right?  After all, ADO.NET Data Service (alright forget it, I’m calling it Astoria) endpoints are services right?  And Visual Studio does have this thing called Add Service Reference?

Alas, now we don’t have to use a command-line anymore.  With Silverlight 2 and Visual Studio tools, you now can use the service reference capability I’d like to show you a screenshot, but it’s not like the dialog window is any different than other service references, so I’ll save me and you the bandwidth.  But try it out.  Take your project, add a reference to your Astoria service.


This work is licensed under a Creative Commons Attribution By license.

  1. 10/14/2008 8:43 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    Service Reference function seems like not work exist WCF end point.
    After upgrade to RC1 Silverlight Tool and Configure Service Reference, Proxy class files are broken!
  2. 10/14/2008 9:06 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    GS: I've been using this all the time with no problems.
  3. 10/15/2008 1:11 AM | # re: Silverlight and ADO.NET Data Service proxy generation
    GS Ryu: Could it be the same issue that I describe here: weblogs.asp.net/.../...visual-studio-2008-sp1.aspx ?
  4. 10/15/2008 2:52 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    Any tutorials on how to use this?
  5. 10/15/2008 4:07 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    Steve: I just recorded a very short-and-to-the-point webcast on how to consume these and should be up at http://www.developers.ie/Webcasts.aspx.
  6. 10/16/2008 2:25 AM | # re: Silverlight and ADO.NET Data Service proxy generation
    Hi,

    I'm using ADO.NET Data Service but I can't configure the clientaccesspolicy.xml, I mean the same configuration that works for other web service doesn't work for ADO.NET Data Service.

    Do you have any suggestion?

    Thanks
  7. 10/16/2008 7:26 AM | # re: Silverlight and ADO.NET Data Service proxy generation
    David: Right now Astoria services don't support cross-domain use from frameworks like Silverlight. I'm working on identifying a workaround now.
  8. 11/13/2008 10:16 AM | # re: Silverlight and ADO.NET Data Service proxy generation
    Tim,

    Any chance you have more information on the prospect of consuming SQL Data Services directly from a Silverlight 2.0 client?

    I was at PDC 2008, and the two seem like a match made in heaven, but if there are cross-site scripting issues, how can we make this work? I also assume that the Service Bus presents the same issues?

    Any thoughts?
  9. 11/13/2008 10:39 AM | # re: Silverlight and ADO.NET Data Service proxy generation
    Chris: There are some known issues with SQL Services (the new name) right now and Silverlight. As you point out x-domain is one as well as authentication. Since you cannot pass auth information on to a service (which I think is still required in SQL Services) that is a blocker right now. I'm not familiar with the service bus unfortunately to speak intelligently on whether or not it would work.
  10. 11/19/2008 1:03 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    Hello Tim,

    Is there an option for the proxy generation to generate more binding friendly code such as ObservableCollection? I have tried the advance option when adding a service and result are the same?

    Thanks,
    James
  11. 11/19/2008 3:02 PM | # re: Silverlight and ADO.NET Data Service proxy generation
    James: We've heard a lot of feedback on this and is something we are considering/working on for the future.

 
Please add 2 and 4 and type the answer here:
First time here? You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting! (hide this)