wcf-ria-services

using Windows integrated authentication with SqlRoleProvider in silverlight application

微笑、不失礼 提交于 2019-12-07 10:08:40
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 8 years ago . 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

Run RIA service on non UI thread

白昼怎懂夜的黑 提交于 2019-12-07 09:29:46
问题 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 回答1: 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

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

余生长醉 提交于 2019-12-07 09:04:35
问题 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

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

一世执手 提交于 2019-12-07 00:55:50
问题 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? 回答1: 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. 回答2: WCF Data Services and NHibernate have

How to configure Parameter/Message length for WCF-RIA-Service operation

a 夏天 提交于 2019-12-06 16:09:18
问题 We send bitmaps from our Silverlight client to the server to be saved, using a WCF-RIA defined service operation. Our DomainService class looks a little like this: [EnableClientAccess()] public class CBitmapSavingService : DomainService { public void SaveBitmap(string bitmapGuid, byte[] pngBytes) { // Save PNG on server file system } } Works fine, until we get a large bitmap. Then we get a 'DomainOperationException' exception. I suspect that we are surpassing a size limit for either the

Silverlight, RIA Services, MVC2P2 = No Data

余生颓废 提交于 2019-12-06 12:43:59
I am having trouble upgrading my current project to use RIA Services. I added all the necessary web.config changes but still no luck. I everything compiles fine but when I hit the page using the datacontext I get an error. I debugged with fiddler and I'm getting a 404 on one of the request. I am getting back headers in my grid so some communication is happening but no data is actually coming through. Another thing to note is that my MVC is running windows authentication. I do have a clientaccesspolicy.xml as well. Error in Silverlight with Headers but no data, Response from Fiddler:

Linq & String.ToLower() strange behavior

邮差的信 提交于 2019-12-06 06:33:14
问题 I have a query on the server side that returns a list of distinct cities from a zipcode table. I'm using WCF RIA Service. The following query successfully returns 228 cities when provincename == "" public IQueryable<CityPM> GetCities(string provinceName) { return this.ObjectContext.ZipCodes.Where(z => z.Province.Contains(provinceName)) .GroupBy(z => z.City) .Select(g => g.FirstOrDefault()) .Select(zc => new CityPM() { ID = zc.ID, Name = zc.City }); } but if I use ToLower() method as below,

If you create a DomainService, exposing an entity, can you access aggregate entities?

折月煮酒 提交于 2019-12-06 06:28:57
问题 Say you create an RIA DomainService and you include a Person (shown below) entity in it, can you access aggregate entities on that object? For instance, if I have entities like so (keep in mind that this is a naive representation, they are modeled via the EF4 designer): public class Person { string FirstName { get; set; } PhoneNumber { get; set; } } public class PhoneNumber { public string AreaCode { get; set; } public string Trunk { get; set; } public string Number { get; set; } } If I

RIA Services and FaultContract

╄→尐↘猪︶ㄣ 提交于 2019-12-06 05:48:32
问题 How can I use the FaultContract attribute with RIA Services so that I'll be able to pass additional information as part of an exception to Silverlight? 回答1: So I went hunting though the decompiled RIA Services code. It doesn't seem like it's possible to significantly alter the error info that is sent to the client. You are able to override the OnError() method in your DomainService, but this doesn't allow you to pass arbitrary information back, even if it's a custom exception type. The reason

WCF Ria Services Wizard not working with CodeFirst

本秂侑毒 提交于 2019-12-06 04:14:22
When using EF Code First, It appears WCF RIA Services Wizard (that runs when adding a new DomainService) in VS 2012 does not recognize the DbContexts defined in the project (it only recognizes the ObjectContext). This means that when Adding a New Item in VS2012 and choosing Add DomainServiceClass, the wizard is not able to detect available context classes * combo list is empty * Please see the attached image Any idea what could be happening here? Thanks, -Sumit This is a known issue with Visual Studio 2012, WCF RIA Services and Entity Framework, cause the Wizard to create new Domain Services