wcf-data-services

WCF Web Service and Data Service using SAML

I have WinForms and ASP.Net applications that need to access WCF Web and Data services using a SAML token. I've been looking at Windows Identity Foundation (WIF) to enable the WCF service to use SAML tokens from an STS-IP. On the client, do I make a call to the STS and get a SAML token, then pass the token to the WCF service? if so, h...

( OData - Open Data Protocol - WCF Data Services - .NET 4.0 ) - Filtering with NULL

Hello, I have the following problem, I need to query for null value using Data Services. In C# I use: DataServiceQuery<Sync.Doctor> query = syncEnt.Doctors as DataServiceQuery<Sync.Doctor>; query.AddQueryOption("$filter", "(Id eq " + CurrentDoctor.Id + " and ((synch_date eq null and deleted eq 0) or (updated_at gt synch_date)))"); T...

ADO.NET Data Service doesn't Update

Hi I've a problem updating objects with the ADO.NET Data Services. First I've create a service, which can load and store the data. Its a basic data context which implements the IUpdatable-interface. After that, I've created a simple service-client. I just created it with the 'Add Service'-reference in Visual Studio. Basically this se...

WCF Data Service Versioning with EF

I have multiple clients and a central server. The server is using a WCF data service to allow clients to update data. An EF Model interfaces the server Data services. Clients use the below code. svr.AddToTable(NewData) svr.SaveChanges() I need to let the server DB add columns to tables and allow clients to continue to work with the d...

Creating a new resource initiates a POST request which initializes all properties

I'm consuming a set of data services with the help of a service reference and using the call svc.AddToXXX(new XXX() {//some properties}) to create a new resource of type XXX. However unlike the update resource call, which uses a MERGE request, this results in a POST request which ends up initializing all unspecified properties with th...

Determine request Uri from WCF Data Services LINQ query for FirstOrDefault against Azure without executing it?

Problem I would like to trace the Uri that will be generated by a LINQ query executed against a Microsoft.WindowsAzure.StorageClient.TableServiceContext object. TableServiceContext just extends System.Data.Services.Client.DataServiceContext with a couple of properties. The issue I am having is that the query executes fine against our A...

Consuming a void service operation in a WCF data service

Hi, from a Wcf data service client (inherited from System.Data.Services.Client.DataServiceContext) I would like to invoke a service operation defined on a Wcf Data Service that returns void [WebGet] public void Operation() { // logic } The only reasonable method I found is the Execute, but how could I use it with a void operation? ...

WCF DataService update certain column

I have the following table: SomeName ID number(8) not null, Field1 varchar2(50) not null, Field2 varchar2(50) not null, Field3 varchar2(50) not null In this table I have the following rows: ID,Field1,Field2,Field3 12,'text1','text2','text3' Now I want to update only the field2 (with an ajax request): HTTP PUT http://host/DataServ...

DataServiceConfiguration inaccessible?

Hey all! The following code worked previous to the Vs2010 upgrade... using System.Data.Services; namespace Nla.Dashboard.Web.Services { public class DashboardDataService : DataService<NlaPrimaryEntities> { // This method is called only once to initialize service-wide policies. public static void InitializeService(DataServiceCo...

Are WCF Data Services (Astoria) a good choice for a Line of Business application?

One of our architects is building a new reference architecture for the next generation of one of our company's applications. The prototype is an ASP.NET MVC 2 web app that sits on top of WCF Data Services (Astoria) and uses EntityFramework 4 for data access and object mapping. The prototype application manages roles of users, so the se...

WCF Data Services: SaveChanges: An error occurred while processing this request.

I get an 'An error occurred while processing this request' Exception when I try to Save some changes from my WPF-Application to a WCF-Data-Service. Loading all Records works fine, but saving them doesn't work. Hope you can help. public partial class MainWindow : Window { private DBEntities _dbEntities; public MainWindow() ...

Collection Exists Criteria in WCF Data Services

I'm trying to ask my OData service: "Give me all the Products that do not have a Category" with the Products and Category have a m2m relationship. I've tried: from p in Products where p.Categories == null select p and from p in Products where !p.Categories.Any() select p and from p in Products where p.Categories.Count == 0...

Best practice to create ADO.NET DataService client

I have windows forms app and server side services based on ADO.NET dataservice. Is it a bad practice to create and initialize one static dataservice client in windows app and use it across the program? For example i can use it in all opened forms(which have bindings to service's datacontext's objects) to call SaveChanges() and not loose...

Inconsistent treatment of quotes in JSON payload

Why is it possible to send in a WCF DataService the following JSON string: { SomeElement: 'val1', SomeOtherElement: 'val2' } whilest you have to send in an normal WCF Service like [OperationContract, WebInvoke (Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, ...

Cascade deletion in WCF Data Services

Hi all, Is it possible to delete persistent objects graph by the single command using WCF Data Services in Silverlight? I've started with this walkthrough and added code for deletion of selected order (which contains details): private void deleteOrder_Click(object sender, RoutedEventArgs e) { Order deletedOrder = (Order)ordersGrid....

Adding REST methods to WCF Data Services?

Hi there, I need to extend my WCF Data Service to include additional methods, not only the database tables.. But it doesn't seem to be working correctly. Firstly i want to ask if this is legal? or throwned upon? The reason i need to do it is i need add additional REST methods that will make a call to ASP.NET Membership services (th...

WCF Data Services (oData): Dependency Injection with DataService

How can I use my IoC container in a DataService and the CurrentDataSource inside for WCF Data Services? I have several services I want to pass into it. The "host" application or project for the DataService is based on ASP.NET MVC 2.0. My IoC container is setup in the MvcApplication. ...

Flagging changed items in DataServiceCollection (OData)

I've got a Silverlight application that has created a master/detail view of data coming from an OData feed (my first app). When I make changes to an item in the detail view, they are showing up just fine in the master, but the user has no indication on what has changed (including adds & deletes). For some reason I can't find a property ...

Consuming WCF Data Services Service Operator (WebGet) async from Silverlight

Having a lot of problems trying to consume a simple service operator in a WCF Data Service from Silverlight. I've verified the following service operator is working by testing it in the browser: [WebGet] public IQueryable<SecurityRole> GetSecurityRolesForUser(string userName) { string currentUsername = HttpContext.Current.User.Identit...

Is JSONP only meant be used for completely public APIs?

Hi, I've developed an API with WCF Data Services which exposes my website user's data. The data hosted there belongs to each user and is not public, so the API is secured with API keys which are unique to each client and http header or GET parameter based authentication. Now I am wondering if I should enable JSONP on my API. It seems ...