ADO.NET Data Service Silverlight Client is not compatible with Silverlight 2 17

I received some comments from a few people asking me how to use Astoria Silverlight Client in Silverlight 2 beta1. So, I tried to update my sample with Silverlight 2 beta 1. but when I added Microsoft.Data.WebClient.dll as a reference in Silverlight 2 beta1 project, I got the following error.

—————————
Microsoft Visual Studio
—————————
You can’t add a reference to Microsoft.Data.WebClient.dll as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies.
—————————
OK
—————————

Then, I went to Astoria forum and found this one posted by Mark. Andrew Conrad (MSFT) said that Astoria Silverlight Client is not compatible with Silverlight 2 beta 1. The updated version will be released before the end of April this year. All we can is “waiting for a while”. :)

17 thoughts on “ADO.NET Data Service Silverlight Client is not compatible with Silverlight 2

  1. Reply desopedr Mar 9,2008 4:11 am

    That confirms what I was thinking… end of April is too late for me,
    I have to deliver my project for June :(

    What is the best way in SL2 to read and update a SQLServer2005 database ?

    And is there a generator of classes for my database objects ?

    Thanks in advance

  2. Reply Michael Sync Mar 9,2008 5:31 am

    Hey desopedr,

    Why don’t you simply use ASP.NET web service? It’s simply and powerful.. you can change it back to Astoria when it’s released…

    btw, how come you are working on Silverlight project? MS doesn’t allow us to use it in Live website, isn’t it?

  3. Reply desopedr Mar 9,2008 7:12 am

    Hi Michael,

    Thanks.

    It’s a school project for my diploma, the project will not be published on the production server.

    But the project has a real context, the goal is evaluating silverlight beta. I will migrate te code on silverlight finale version to publish the website online if silverlight increase the user experience of the project.

    Yes, I can use WCF but I want to use Astoria. I want a solution that adapts well the change, I am afraid of having to redo everything when I change WCF to Astoria.

  4. Reply Justin-Josef Angel [MVP] Mar 9,2008 9:07 am

    Can’t you just decompile the SL1.1 Astoria client and recompile it to SL 2.0 as a temporary solution?

  5. Reply Michael Sync Mar 9,2008 9:47 am

    Hello desopedr.

    Yes. we can WCF but I’m not that familiar with WCF. You can use either “WebService” (.asmx) or HttpWebRequest with Astoria. I’m making to do one sample with HttpWebRequest for you.. I think i can probably post the full source tomorrow.. It’s 12:44 PM so it’s too late for today.

    Hello Justin,

    I don’t know how to decompile the SL 1.1 client. Can you please tell me how?

    I have tested for getting the data from Astoria service by using WebClient. It is working fine.. but I have to test for Insert/Update/Delete.

  6. Reply desopedr Mar 9,2008 12:18 pm

    Hi Michael,

    Wow it’s very cool if you can do it!

    I work in an IT company (.NET), and I am working on my SL2 project for my diploma in my spare time, so I have a stressful period and I thank you so much if you can give me a way to use Astoria with SL2.

    Hello Justin,

    Can you explain or give a link to this ? Thanks

  7. Reply S2 Mar 10,2008 1:10 am

    Hi Michael,

    Do you have any example or tutorial of how to easily create an ASP.NET web service to use with MSSQL-2005?

    Tnx alot.

  8. Reply Michael Sync Mar 10,2008 3:38 am

    Hello S2,

    Sorry for late reply. I just come back from my office.

    Using normal web service with Silverlight is very simple, You can just create web service item in ASP.NET webproject. In SL project, you can jsut click “Add Service Reference”. then click “discover” to get the webservice proxy and add it to your SL project. that’s all..

    I’m doing one sample for desopedr now.. i found a lit bit tricky to use Astoria with httpwebrequest.. hope i will be able to make it work soon. after that, i will make another sample for you, S2.

  9. Pingback: Michael Sync » Silverlight 2 (beta1) - Database Operations with ASP.NET Web Service in Silverlight 2

  10. Reply Michael Sync Mar 10,2008 11:12 am

    Hey SL2, I got it for you.. please check-out the next post.

    Hey desopedr,

    Sorry. man. I have a few problems.. give me a lit bit more time. I’m working on it. :)

  11. Reply desopedr Mar 10,2008 1:35 pm

    No problem I can wait a few days, I have a lot to learn :)

  12. Reply S2 Mar 11,2008 1:27 am

    Tnx alot Michael for your fast response.

    But you said:

    Using normal web service with Silverlight is very simple, You can just create web service item in ASP.NET webproject. In SL project, you can jsut click “Add Service Reference”. then click “discover” to get the webservice proxy and add it to your SL project. that’s all..

    Maybe a dumb question, but for my school project I need to create a webservice to use with Silverlight(2), WPF and MSSQL. What is the big difference if using the above simple way, or using Astoria like i tried with Silverlight 1.1 alpha?

    Tnx.

  13. Reply Michael Sync Mar 11,2008 1:39 am

    Hi S2,

    Even though I have been using normal Web service for long time, I’m very news to Astoria. So, I asked this question to Astoria team in MSDN forum and I got the long and detailed reply from Astoria team manager. The main differences that I aware are ~

    1. Astoria is for RESTful service while normal ASP.NET are just soap client.

    2. Astoria service can be accessed by typing the query from the addressbar of browsers.

    3. Using RESTful service with RIA application is good practice.

    Please read this link.

  14. Reply desopedr Mar 14,2008 2:30 am

    Hi,

    Astoria with silverlight2 is still planned? Or did you saw that it was not possible?

    Thanks

  15. Reply Michael Sync Mar 14,2008 9:30 pm

    Hi Desopedr,

    Sorry for late reply. I’m trying really hard to find the solution.. i found a lot of issues during those days. Finally, I found the way to insert the data from SL to Astoria web service. :) As I told you earlier, I already have the code for getting data. Now, I got the solution for inserting data. I’m testing for deleting and updating. I will post about this weekend. If you need the code urgently, let me know. I can pass it to you..

  16. Reply Michael Sync Mar 15,2008 5:18 am

    hey man, deleting is also working now.. :) just left for updating.. :)

  17. Reply desopedr Mar 15,2008 7:04 am

    Great :)

Leave a Reply