ria-services

Silverlight - Access Facebook Api on Client Side or through Server Side Wrapper?

I am wondering how to access facebook api best using Silverlight. Right now i am developing a silverlight(+ria services) app for facebook. I see 2 possibilities: 1) Access facebook api using the facebook developer kit for silverlight (Facebook.Silverlight.dll) 2) Create a service class on Server Side which acts as a wrapper for easy ...

quick and dirty client/server communication in Silverlight

I'm building a few small prototypes in Silverlight and have quite a bit of .NET experience, but Ive never had the need to contact the server from Silverlight. Im really just after a really quick solution for the purposes of prototyping and I'll be needing to call the server and do a few things, like serve a generated image from the serv...

NHibernate session management with RIA-services

How should I manage my session? I've seen some examples where the session is created in the constructor of the domainservice and destroyed in the dispose method, but this seems like a bad idea. Would appreciate help here because I can't find any information. ...

Entity Framework insert error ("The Version field is required.")

I am using Silverlight 4 and RIA services. When I try to insert into my database, I get the following error: "Submit operation failed validation. Please inspect Entity.ValidationErrors for each entity in EntitiesInError for more information." Upon inspecting the ValidationErrors, I see: "The Version field is required." Isn't...

Best resources to learn WCF RIA Services

The question title says it all, really. What books, videos, articles are you looking at to learn how to use the newly released WCF RIA Services for Silverlight? Thanks! EDIT: I will continue to update this list with community answers. Please let me know if you've found any useful material about WCF RIA Services. Starting Point WCF R...

possibility to do type/data conversion of data returned by ria services?

My service returns an byte array, which I have to convert to an 'animated gif' (using imagetools since silverlight doesn't support it yet) I was wondering, is it possible to insert some code at the client, where I can do the conversion before the actual object is returned to whatever it is binded against? On the server side, the querie...

The "CreateRiaClientFilesTask" task failed unexpectedly.

Hi guys. I've VS 2010 and recently installed WCF RIA Services V1.0. For testing I have created a new Silverligh Business project but now every now and then when I rebuild the solution I receive the following error: Does anybody know why I get this? Thanks Error 1 The "CreateRiaClientFilesTask" task failed unexpectedly. System.IO.F...

Unable to get data from RIA Service

Hi guys. I'm trying the SL4 and RIA Services out. I followed the common tutorials available using SL4 Business template but I don't know why when I run the app I won't get any results from the service. I have added a ADO.NET model which is connected to Northwind database and has only Employees table in it and also created its domain se...

Silverlight Self-Tracking Entities vs. RIA Services

One of the features provided by RIA services is that your server-side model objects get automatically proxied in your Silverlight front end and are automatically serialized back to the server for operations such as saving to the database. This seems to be a very similar goal to what "Self Tracking Entities" are providing, which is a tec...

Don't show Data in DataGrid

Hi in my app, I used WCF Services for load data from SQL DB then in Completed Event Handler of my ServiceClient write this code: void svc_GetOrdersCompleted(object sender, GetOrdersCompletedEventArgs e) { if (e.Error == null) { dgOrders.ItemsSource = e.Result; txtStatus.Text = ""; } else txtSta...

NHibernate equivalent of LinqToEntitiesDomainService in RIA

Hi, When using Entity Framework with RIA domain services, domain services are inherited from LinqToEntitiesDomainService, which, I suppose, allows you to make LINQ queries on a low level (client-side) which propagate into ORM; meaning that all queries are performed on the database and only relevant results are retrieved to the server an...

silverlight master-detail with two listboxes in pure xaml with ria services throwing exception

Hi, I was trying to achieve master-detail with 2 ListBox, 2 DomainDataSource and a IValueConverter, when entering the page it throws the random error it does when your xaml is invalid: "AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 24 Position: 61]" Which is in fact the start position of where I am binding the listbox selected item with convert...

Validating method arguments with Data Annotation attributes

The "Silverlight Business Application" template bundled with VS2010 / Silverlight 4 uses DataAnnotations on method arguments in its domain service class, which are invoked automagically: public CreateUserStatus CreateUser(RegistrationData user, [Required(ErrorMessageResourceName = "ValidationErrorRequiredField", ErrorMes...

Mocking ObjectContext, dealing with ObjectQuery.Include(string) method?

I have been investigating how to decouple my DomainServices from their datasource so I can test them in unit tests. I'm starting to think fully decoupling them is not possible. There is a decent amount of info out there, such as this question and this blog post. The blog post in particular gets you really far into mocking ObjectContext....

SQL Server Authentication in Silverlight/RIA-Services app

Hi, I am creating a new Silverlight 4 business application using RIA services. This will be using a SQL-Server 2005 DB. There is no AD setup so I am required to use SQL Server Authentication. The details that the user uses to login to the system will be used to hit the SQL Server. E.g., if username="TestUser" and password="Password"...

A pattern for multiple LoadOperations using WCF RIA Services

I would like to be able to load several RIA entitysets in a single call without chaining/nesting several small LoadOperations together so that they load sequentially. I have several pages that have a number of comboboxes on them. These comboboxes are populated with static values from a database (for example status values). Right now I ...

Using RIA Services FilterDescriptor from code behind

Hi, I was wondering if it's possible to use the FilterDescriptor control from code behind? On the page load of my form I set the datasource of a grid in the code behind, not using a DomainDataSource control, like: TestDomainContext context = new TestDomainContext(); dataGridEmployees.ItemsSource = context.EmployeePositions; context.Lo...

Problem during RIA authentication

Hi I've built an authentication service in RIA that inherits from DomainService and IAuthenticate. The problem is following: When LoginOperation fails (loginOperation.LoginSuccess is false) due to wrong credentials, everything is ok and it is reported to the user. However, when login succeeds, I get throw a really weird exception: {...

Silverlight (RIA Services) spontaneous culture changing

My RIA enabled Silverlight Application is setting the thread culture in the App constructor (this is absolutley okay since it is an intranet application and will never ever be used by someone who is not german): public App() { InitializeComponent(); Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE"); } It does what...

Silverlight 4 + WCF RIA - Data Service Design Best Practices

Hey all. I realize this is a rather long question, but I'd really appreciate any help from anyone experienced with RIA services. Thanks! I'm working on a Silverlight 4 app that views data from the server. I'm relatively inexperienced with RIA Services, so have been working through the tasks of getting the data I need down to the client,...