wcf-ria-services

Troubleshooting Silverlight 5 and Ria services [Web-Services-AuthenticationService.svc does not exist]

老子叫甜甜 提交于 2019-12-05 04:10:09
问题 I have two different versions of a Silverlight 5 project using Ria services. Both work locally. The older version (A) works when deployed to ISS7. The new version (B) does not. There is user/password authentication that fails for version B with the error: Load operation failed for query 'Login'. the remote server returned an error: NotFound. Referencing various SO and MSDN posts over the past week, I have tried many troubleshooting techniques. Adding error logging as suggested here to the web

.Net RIA Services: DomainService Needs a Parameterless Constructor?

℡╲_俬逩灬. 提交于 2019-12-04 23:45:18
问题 I'm using the July CTP of .Net RIA Services in an ASP.Net application with some Silverlight components. I'm calling the RIA Services from Silverlight. My problem arose when I tried to use Unity and constructor dependency injection in my Domain Service (a LinqToEntitiesDomainService object). The Silverlight application now complains about not having a parameterless constructor. I don't want to have a parameterless constructor, I want Unity to resolve the constructor arguments. Is this possible

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

柔情痞子 提交于 2019-12-04 19:30:44
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 parameter or the message. Can I reconfigure my service such that larger bitmaps can be sent from the client

XmlSerializer stopped working after updates

元气小坏坏 提交于 2019-12-04 17:25:52
I'm using XmlSerializer. I've had no problems with it until now. I updated Silverlight from 4 to 5 and at the same time also updated the WCF RIA Services from v1 SP1 to v1 SP2. Now the following line gives me an error. XmlSerializer s = new XmlSerializer(typeof(MyCustomObject)); The error is: System.InvalidOperationException: System.ServiceModel.DomainServices.Client.EntityConflict cannot be serialized because it does not have a parameterless constructor. The object I'm using (MyCustomObject in the sample) has not changed in any way so I'm starting to think it's either SL5 or the new RIA

The “CreateRiaClientFilesTask” task failed unexpectedly

爱⌒轻易说出口 提交于 2019-12-04 15:53:50
问题 I've VS 2010 and recently installed WCF RIA Services V1.0. For testing I have created a new Silverligh Business project but now every now and then when I rebuild the solution I receive the following error: Does anybody know why I get this? Thanks Error 1 The "CreateRiaClientFilesTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceModel.DomainServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one

How to combine .NET RIA Services with MVVM in Silverlight 3?

懵懂的女人 提交于 2019-12-04 15:24:35
The .NET RIA Services are described as an n-tier framework for Silverlight. I have been wondering what the relation is between this framework and the Model-View-ViewModel pattern. Are they in conflict or can you see the potential for synergic combination? .NET RIA Services and MVVM are synergistic, and aren't in conflict. For example, if I write a Catalog domain service that exposes Products and Categories on the server, and correspondingly have a Catalog domain context on the client... then the following are options to use depending on the scenario: Write a view model that wraps the Catalog

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

倖福魔咒の 提交于 2019-12-04 12:42:54
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 include Person when creating the PeopleDomainService, can the client access the PhoneNumber on it (and

Linq & String.ToLower() strange behavior

纵饮孤独 提交于 2019-12-04 11:35:44
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, the query returns 0 cities when provincename == "" . public IQueryable<CityPM> GetCities(string

How to prevent Silverlight RIA Entity getting attached to datacontext before i'm ready

坚强是说给别人听的谎言 提交于 2019-12-04 10:01:01
I have a Silverlight 4 application for a simple 'TODO' list. The problem I'm having is that databinding is hooking up relationships on my TODO object, which causes the RIA data context to add it to the DataContext.TODOs list before I want it there. I want to treat the object as new and detached until I'm explicitly ready to add it to the datacontext. Here's how it works : I've got my TODO entity which is associated with a Status (RIA services entity relationship). I create a new TODO() entity which is passed to a ChildWindow popup. Notice that I don't add this new entity to my datacontext. new

RIA Services and FaultContract

[亡魂溺海] 提交于 2019-12-04 09:10:48
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? 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 is buried inside the exception handling of the DomainServices.Hosting.QueryProcessor class. If an unhandled