wcf-ria-services

RIA Services Domain Service Class web.config setting

落爺英雄遲暮 提交于 2019-12-06 03:53:40
I've added a domain service class to the server side project of my SL4 / EF / RIA Services application. I've managed to create all the necessary elements needed in my web.config section. (Btw, why isn't this generated for me when I created my Domain Service Class?) What I'm missing now is what to put in the contract attribute of my endpoint element: <service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService"> <endpoint address="http://localhost:6400/ClientBin/XXX-Web-RIAServices-MyService.svc" binding="basicHttpBinding" bindingConfiguration=

Polling Pattern for Silverlight 4 WCF Ria Services

非 Y 不嫁゛ 提交于 2019-12-06 03:29:43
I am creating an application in Silverlight using Ria Services that can take quite a bit of time once the service call is initiated. I've looked for ways to increase the WCF service timeout, but the more I think it through, this is not the right aproach. What I would rather do is call the DomainContext and return right away, then have the client poll the server to find out when the long running query is complete. I'm looking for a pattern or example of a good way to implement something like this. One potential issue that keeps coming to mind are that web services should not keep state between

WCF DataService with Entity Framework: TimeSpan support

蓝咒 提交于 2019-12-06 01:33:47
I am trying to create a WCF Data Service over an Entity Framework Object context that exposes a number of System.TimeSpan properties. However, when I try to access the service, I get the following error: 'The property 'ScheduledDepartureTime' on type 'DepotRoute' is of type 'Time' which is not a supported primitive type.' I have tried using DataServiceConfiguration.RegisterKnownType(typeof(TimeSpan)) as well as DataServiceConfiguration.EnableTypeAccess(typeof(TimeSpan).FullName) but neither of these seem to make any difference - I still get the error... public static void InitializeService

Run RIA service on non UI thread

半世苍凉 提交于 2019-12-05 19:16:09
I am trying to make RIA service calls from non UI thread. I made calls with opening new thread and with background workers, but for both cases callback is running on UI thread. Is it possible to execute callback on callers thread, not UI? Thanks Ed Chapel tl;dr Use WCF Marshal your results to the UI thread yourself WCF RIA is built to do work on the UI thread WCF RIA was designed to work mostly on the UI thread. That obviously has many pros and cons; mostly cons in your case. I'm having trouble finding definitive documentation of this design, however, most questions on the topic are answered

RIA Services Vs. WCF and Shared Code

别等时光非礼了梦想. 提交于 2019-12-05 16:28:18
We're starting to develop a new Silverlight LOB application where the DataAccess will not be based on EF, rather our own DAL code (for legacy and other not related reasons). We are currently debating whether to use RIA Services or simple WCF Services as the Silverlight's facade layer. The options: RIA Services and generated code: RIA Services will automagically create proxy classes of our Domain Model and DomainServices in our Silverlight project. This will mean that our services will need to inherit from the DomainService class, and will require much work and workarounds to allow our custom

How can I get details about a Silverlight code generation exception?

℡╲_俬逩灬. 提交于 2019-12-05 16:17:19
I'm getting the following error now when I build my Silverlight Business Application: The code generator 'Microsoft.ServiceModel.DomainServices.Tools.CSharpCodeDomClientCodeGenerator' encountered a fatal exception and could not generate code for project 'C:\Software\ProjectPartCenterAdmin\Alpha\Latest Version\ProjectPartCenterAdmin\ProjectPartCenterAdmin.csproj': Exception has been thrown by the target of an invocation. I DID ABSOLUTELY NOTHING TO MY CODE since it last worked! All I did was a clean rebuild of the application. Is there a way to get the details on what the exception was? I am

using Windows integrated authentication with SqlRoleProvider in silverlight application

爱⌒轻易说出口 提交于 2019-12-05 13:19:14
I am working on web application that requires that users are put into roles and are given different permissions based on their roles. This can be easily done by using Forms Authentication and SqlRoleProvider. But, application will be used internally within corporate intranet, and forms authentication forces users to manually login every time they want to use application, Using Windows integrated autenthification looks much more elegant, since users are already logged on corporate domain. But there is a problem with roles here, integrated authentication by default uses roles that are built in

Exception handling in RIA Service

北慕城南 提交于 2019-12-05 12:18:31
问题 As you know, it's recomended handle exceptions using FaultException with standard WCF service to hide exception details. That's fine but i'm having problem with WCF Ria service. I want to throw an exception from domain service and the client will handle that exception. I want to avoid disclosing exception's sensitive information such as stack trace, method names etc. If it were standard WCF service, I'd use FaultException exception, but in Ria service, it's not working. No matter what kind of

EF5 Code First and RIA Services Silverlight “Object reference not set to an instance of an object” error building client

╄→гoц情女王★ 提交于 2019-12-05 06:12:27
I am working on setting up a new project using Code First for entity framework 5 in silverlight using RIA services. I have created a test project due to some issues I have encountered and will post the code below. Namely, I get an 'Object reference not set to an instance of an object' error anytime I attempt to build the silverlight client project which should generate the client proxy classes. Just to be clear, this error is not while running or debugging the application, but when building it. I have isolated that this only happens if I have any navigation properties/Foreign Keys defined on

Can WCF Data Services or RIA Services be implemented with NHibernate?

心已入冬 提交于 2019-12-05 04:31:14
From what I read on the internets , WCF Data Services seem to be bound to data access via Entity Framework on the server. Is there a way to have NHibernate access mapped in the same way? WCF RIA Services can certainly be used with NHibernate, and I believe WCF Data Services can too. Both frameworks build on top of IQueryable<T> which can be provided by LINQ to NHibernate See this post from Brad Abrams, where he uses RIA Services with NHibernate. WCF Data Services and NHibernate have limitations you should be aware of. There is a bit more to the picture besides just IQueryable, have a look for