ado.net-data-services

Select Single Value with ADO.Net Data Services and LINQ

Hi Guys, Trying my hand at ADO.Net data services. All the examples shows how to retrieve lists but how would you go about retrieving a single value? e.g. Product X's Price. Here is the LINQ query i use: var qry = (from p in svcContext.Products where p.ProductName == "Chair" && p.Co...

Ado Net Data Services BeginExecute Problem

public void metodoX() { foreach (TURNO t in listaTurnoPersona) { DataServiceQuery<VST_CANTIDAD_PERSONAS_POR_DIA> query = General.Entities.VST_CANTIDAD_PERSONAS_POR_DIA.Where( z => z.ID_TURN == t.ID_TURN && z.FE_CALE >= RadDatePicker1.SelectedDate.Value && z.FE...

HTTP 401.3 when PUT, DELETE to ADO.NET Data Service (.svc)

I have an ADO.NET Data Service (we'll call it service.svc). When I deploy it to an IIS 6 site with Integrated Windows Authentication turned on, all requests (GET, POST, PUT, and DELETE) work fine for me, because I am an administrator on the box. However, when a non-admin user hits the service, only GET and POST requests work. When they t...

ADO.Net DS Client: DataServiceContext.BeginExecuteBatch fails to connect

I have a Silverlight 2.0 application using IIS7 and Sql 2008. I'm using ADO.Net Data Services to expose our Entity Framework objects to the SL client. What I am seeing is that on a particular request in my application I initiate a batch request with 4 different service queries; for some reason in certain cases no HTTP request is ever iss...

Creating Enums from Entities

I have tables named Events and Log. The Events table comprises of ID, Event description and type. And, the Log contains LogID, EventID(refers to ID from Event table), and timstamp. I am using Entities framework. While making an entry in the log table, i mention the event id as the number corresponding to the log event from the Event ta...

How can i pass an authentication cookie to an ADO.NET dataservice in Silverlight

I can pass a cookie into my silverlight application from another asp.net page, but i need to add it to the request header of my dataservice... This was easy in ASP.Net, but in Silverlight it seems that i can't manipulate the request header private void Authorize() { Cookie dataServiceAuthCookie = new Cookie(HtmlPage.Docu...

Ado .net data services in the same app

I have an application with an EDMX and an Ado .net data service in it. I would like to make a call from the same application (not an http call) to the ado .net data service and would like to use the url like syntax to query using a string of filters that have been built up programatically: public class AdventureWorksService : DataServic...

Tunneling HTTP PUT through POST in ADO.NET Data Services

The problem with J2ME clients consuming ADO.NET Data Services (Astoria) is that there is no support for the PUT and DELETE verbs. Using the WCF REST Starter kit one can intercept a request to a WCF service using a new ServiceHost that exposes a property called Interceptors which lets you intercept requests and responses. Since Astoria i...

How do I wire up a WebForm to a ADO.NET Services "resource"?

I know I could use WebClient or WebRequest, but somehow this feels like using WebClient or WebRequest to do a postback or a crosspage postback. What do I need to do to get a WebForm to "post" to a ADO.NET service, which is expecting a different verb and has a different URL? I googled this but couldn't find anything to enlighten me. ...

Astoria Error - Expected an absolute, well formed http URL without a query or fragment.

I'm trying out my ADO.NET Data Service for the first time by having the model create using Entity Framework. I am testing to see if the service works via a client by creating a simple console application. Here is the body of my Main method: MyEntities context = new MyEntities (new Uri("MyEntitiesDataService.svc", UriKind.Relative));...

ADO .NET Data Services for dummies

I'm taking another project currently, which is based on the ADO .NET DS, and I need to get into the topic as quick as possible. What is the purpose of ADO .NET Data Services in simple words? What is the best resource explaining ADO .NET Data Services? ...

Custom authorization in ADO.NET Data Services

I have an ADO.NET Data Service that exposes an Entity Framework data model (.edmx). I need to allow / reject reads/writes to certain entities for certain users. I use Windows Authentication. All I could find is overriding the OnStartProcessingRequest : protected override void OnStartProcessingRequest(ProcessRequestArgs args) { base...

Exception thrown when trying to access an ADO.NET Data Service Built with the Entity framework

While trying to use the entity framework and ado.net data services, I'm hitting a real headscratcher. Before the request even makes it to my code, i get a WCF exception (Exception at the bottom). It's not very helpful at all. All my entites have primary keys and all properties on all entities are public. Any ideas what can be causing th...

Can Ado Data Services replace my webservices which i use in ajax calls in my websites?

I used to create normal webservices in my websites, and call these services from javascript to make ajax calls. Now i am learning about Ado Data Services, My question is: Does this Ado Data Services can replace my normal webservice in new sites i will create? And if Yes, Can i put these Ado Data Services in a separate project "local o...

data not deleted from DB when removing items in RIA Services

I have a Silverlight3 client consuming an unmodified/code-generated DomainService through RIA Services with a Linq-to-SQL back end. Is this the correct way to delete a row from the database? this.context.Albums.Remove(this.context.Albums[0]); this.context.SubmitChanges(); The SubmitOperation comes back with no errors, but no rows are...

How to slice/filter data in Entity Framework Model?

Each our table has column TenantID. Normally we slice data with NHibernate filters. We need the same for Entity Framework Model. We will use this model as source for ADO.NET Data Services, so it is better to have model free of infrastructure properties like TenantID. From code side we know TenantID thread statically. UPD: I found Quer...

Bogus InvalidOperationException (in a DataServiceRequestException)

I am having a hard time with ADO.NET Data Services (formerly code-named Astoria) as it gives me a bogus exception when I try to insert a new entity from the silverlight client and trying in a clean project (the same code) doesn't. In both cases, however, data is correctly inserted into the database. Using Fiddler (an HTTP debugger I cou...

ADO.NET data services or Entity framework - Which one to learn?

Hi, I am having a bit of a free time and i am planning to catch up on some new technology. I started of my .NET development career as a ASP.NET developer. Presently I am done with ASP.NET development,for that matter i am done with any front end development. These days i am into Business layer and DAL development with the primary focus o...

Where does ADO.net Data Services fit in an N-Layer Arch ??

I dont like accesssing data directly from the UI layer. I am somehow failing to understand where to use a ADO.net data service in an N-Layer arch software. EDIT: I am struggling with the concept of a service as a DAL. I would assume it isnt too efficient although it looks scalable. ...

clientaccesspolicy.xml file not working...

Hi all... I have a site with a Silverlight-enabled WebSerivce (.svc file). In that app is also a Silverlight application which references this service. Now, our website uses multiple headers (to account for the user coming to it with or without the 'www.' subdomain, e.g. mydomain.com and www.mydomain.com). So i put in a clientaccesspol...