wcf-data-services

WCF Data Services Error - 302 Moved on SaveChanges() related to HTTPS + Load Balancer?

 ̄綄美尐妖づ 提交于 2019-12-06 12:49:43
Problem: DataServiceContext.SaveChanges() fails with "302 - moved" response. Background/Suspected Cause: Load balancer! - We recently changed our infrastructure so that our web servers now sit behind a load balancer which also handles the ssl. Clients address the service as HTTPS but IIS ends up processing HTTP requests since the SSL was done by the load balancer(I am sure most of you are familiar with this type of setup). Anyway, what we end up with is a feed that contains URIs that are using HTTP rather than HTTPS. (see GET request/response below with http in the response instead of httpS).

Data compression for ADO.NET data services

ぃ、小莉子 提交于 2019-12-06 12:32:36
I have an ADO.NET data service exposed by a .NET app (not IIS) which is consumed by a .NET client app. Some calls to this data service return large amounts of data. I'd like to compress the XML data on the wire to reduce payload and improve performance. Is this possible? I assume you're hosting using WCF in your .NET "app"? If so, you would need write some custom MessageEncoder implementation because WCF does not provide this out of the box. Luckily there is a sample in the SDK that you can use. I actually just realized that this is only step one of two depending on whether or not your client

How do I lock down a .net 4.0 WCF Data Service

北慕城南 提交于 2019-12-06 11:35:54
I've had a WCF Data service published for about 2 months. It's 100% been hacked already. I even noticed the service published on twitter! Luckily my site was under development and the user entity was only about 80 beta testers. Still this is a pretty big problem. With the power of E.F. Navigation properties anyone can easily write a script to download all my user data and my valuable domain data that no-one else has. I want to provide non-authenticated access and do things like: Limit what columns get exposed (e.g. a users emails) Limit number of requests possible per day (e.g. 10 per request

WCF Data Services 5.0 Workaround for returning POCOs?

好久不见. 提交于 2019-12-06 11:22:14
I'm pretty sure it hasn't, but apologies if this question has already been asked. And additional apologies if this is just flat out a dumb question but I feel like I'm either completely missing something or have the right idea and just need some backup for my own sanity. I've been implementing WCF Data Services 5.0 in our application and am having no issues with read operations returning entity objects. Unfortunately there is that nasty limitation when it comes to service operations that they can only return primitive types ( See MSDN ). It's very annoying given that it has no problems with

How can I setup OData and EF with out coupling to my database structure?

霸气de小男生 提交于 2019-12-06 11:14:13
I really like OData (WCF Data Services). In past projects I have coded up so many Web-Services just to allow different ways to read my data. OData gives great flexibility for the clients to have the data as they need it. However, in a discussion today, a co-worker pointed out that how we are doing OData is little more than giving the client application a connection to the database. Here is how we are setting up our WCF Data Service (Note: this is the traditional way) Create an Entity Framework (E)F Data Model of our database Publish that model with WCF Data Services Add Security to the OData

WCF DataService over Https

蹲街弑〆低调 提交于 2019-12-06 10:33:46
I am developing a WCF DataService that's self-hosted inside a Windows Console Application. I want to activate my service over Https (i.e. SSL) instead of Http. How can I do that? Thanks First Creating a CA Certificate on Windows (use Visual Studio Command Prompt): makecert -sv SignRoot.pvk -cy authority -r signroot.cer -a sha1 -n "CN=Dev Certification Authority" -ss my -sr localmachine Now put the certificate in the "Trusted Root Certification Authority" in Windows Key Store. That can be done through MMC. To do that: Run... -> Type "mmc" -> enter -> choose the "Certificates" console -> Find

How would an upgrade from verbose JSON to JSON light affect someone who only looks at the data, and not the metadata?

我只是一个虾纸丫 提交于 2019-12-06 09:20:45
问题 Can anyone explain to me concisely in plain English with a few bullet points what the main differences are between verbose JSON and JSON light for WCF Data Services? I found a document called "JSON light at a glance" by Microsoft, but it's 23 pages long! I don't care about metadata; I only care about the data. I know that JSON light drops the "d" wrapper. Anything else? Are the data types (dates, booleans, etc) sent in the same format? EDIT: I realize that now Microsoft is now calling JSON

ADO.NET data services their place in overall design

左心房为你撑大大i 提交于 2019-12-06 09:03:52
ADO.NET Data service is the next generation of data access layer within applications. I have seen a lot of examples using it directly from a UI layer such as Silverlight or Ajax to get data. This is almost as having a two tiered system, with business layer completely removed. Should DAL be accessed by the Business layer, and not directly from UI? ADO.NET Data Services is one more tool to be evaluated in order to move data. .NET RIA Services is another one. Much better I would say. I see ADO.NET Data Services as a low level services to be used by some high level framework. I would not let my UI

oData WCF Data Services Filter Child Collection

隐身守侯 提交于 2019-12-06 08:50:55
问题 I have an array of customers, each customer has a collection of orders. the query below returns customers and their orders and works as expected: ~Customers?$expand=Orders Now I want to get the existing customers but filter their orders by Order.Amount > 100 (I'm happy for the customers having no such orders to remain in the list), When I'm trying the following: ~Customers?$expand=Orders&$filter=Orders/Amount gt 100 I'm getting the following error: The 'Amount' is not allowed at position ***.

Synchronous ADO.NET dataservices calls in Silverlight

这一生的挚爱 提交于 2019-12-06 07:35:41
I'm using ADO.NET dataservices in a Silverlight application and since the silverlight libraries don't support the ToList() call on the IQueryable I thought it might be possible to create an extension method around this called SilverlightToList(). So in this method I'm calling the BeginExecute method on my context as shown below: var result = context.BeginExecute<T>(currentRequestUri,null,context); result.AsyncWaitHandle.WaitOne(); return context.EndExecute<T>(result).ToList(); The problem is that when I call the WaitOne() method this results in a deadlock. Is this a limitation of ADO.NET