Print Page | Close Window

BIg Shelf RIA Sample

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3089
Printed Date: 13-May-2026 at 2:59am


Topic: BIg Shelf RIA Sample
Posted By: donn
Subject: BIg Shelf RIA Sample
Date Posted: 10-Nov-2011 at 12:04pm
I am a new DevForce user and having problems getting the BigShelf sample application to work.
 
I am able to pull up the default.aspx page and sucessfully login but I get no data back from the entity manager.
I checked the acompaning writeup and it says to look for a http response code of 500 for starters.
 
Well, I am getting this 500 error, but it is not because the RAI Services 1.0 SP2 update has not been installed. 
Instead, I am getting a message stating that 'BigShelf.Models.Book.EntityAspect' is already defined.
 
below is both the reponse error code and the response body.
Thanks-
Don 
 

Key Value
Request GET /BigShelf-BigShelfService.svc/json/GetProfileForSearch HTTP/1.1
Response Body
Property 'BigShelf.Models.Book.EntityAspect' is already defined by 'IdeaBlade.EntityModel.Entity and cannot be redefined.




Replies:
Posted By: kimj
Date Posted: 10-Nov-2011 at 6:58pm
Hi donn,
 
It looks like we broke this sample in our last release of DevForce.  The problem is in the RiaEntity class in the Models folder.   The class definition should look like this:
 
public abstract partial class RiaEntity : IEntity 
{
  
  [Exclude]
  public new EntityAspect EntityAspect {
    get { return base.EntityAspect; }
  }

}


Posted By: donn
Date Posted: 11-Nov-2011 at 12:04am
now getting a different error:

{"ErrorCode":500,"ErrorMessage":"Method not found: 'Void System.ServiceModel.DomainServices.Server.DomainServiceContext..ctor(System.IServiceProvider, System.ServiceModel.DomainServices.Server.DomainOperationType, System.String)'.","IsDomainException":false,"StackTrace":" at System.ServiceModel.DomainServices.Hosting.DomainOperationInvoker.GetDomainService(Object instance, String operationTag)\u000d\u000a at System.ServiceModel.DomainServices.Hosting.DomainOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)"}

I tried rebuilding and the compiler now complains as well.
Says the base class for RiaEntity: IEntity does not have a definition for "EntityAspect"

Error 1 'object' does not contain a definition for 'EntityAspect'
File: RiaEntity.cs  Line: 20 Column: 31
this is what I found in the IEntity definition:
    public interface IEntity
    {
        // Summary:
        //     Returns the IdeaBlade.EntityModel.IEntity.EntityAspect for the entity.
        EntityAspect EntityAspect { get; }
    }


Posted By: kimj
Date Posted: 11-Nov-2011 at 8:39am
Which version of DevForce are you running? 


Posted By: donn
Date Posted: 11-Nov-2011 at 9:10am
DevForce 2010 WinClient v6.1.3


Posted By: kimj
Date Posted: 11-Nov-2011 at 10:13am

OK, the change I posted should work.  There was already a file named RiaEntity.cs in the project, so I wanted you to replace just the class definition.  The entire RiaEntity.cs file contents should look like this:
 

using System;
using System.ServiceModel.DomainServices.Server;
using IdeaBlade.EntityModel;
 
namespace BigShelf.Models
{
    /// <summary>
    /// Base class for all entities in the DevForce model
    /// </summary>
    /// <remarks>
    /// Have to hide the EntityAspect property from RIA Services.
    /// </remarks>
    public abstract partial class RiaEntity : IEntity
    {
     
      [Exclude]
      public new EntityAspect EntityAspect {
        get { return base.EntityAspect; }
      }
 
    }
}

The only change from the original download should be the addition of the IEntity implementation.  If you're still seeing a problem, I also fixed the sample available from the DRC, so you can re-download that if necessary.



Posted By: donn
Date Posted: 11-Nov-2011 at 2:12pm
Yes, I did only replace the RaiEntity.cs class definition, not create a new file.
 
anyway I pulled down the new version of BigShelf from the DRC and do see the changes to the file as mentioned above.
(so I believe I have the version you want me to have).
 
I am still getting the same error though again referencing the Interface => Ideablade.EntityModel.IEntity
The compiler says: "Unknown member 'EntityAspect' of 'BigShelf.Models.RiaEntity'"
I have DevForce 2010 WinClient v6.1.3 and the new version of BigShelf.
I have also installed this on 2 separate workstations both getting the same error.
I also have the latest version of WCF RIA Service 1.0 SP2 installed (release date: 9/1/2011)


Posted By: kimj
Date Posted: 11-Nov-2011 at 2:28pm
Hmm.  The RiaEntity partial class here is "extending" the RiaEntity defined in BigShelf.IB.Designer.cs.  Please check if you see RiaEntity defined in that file as well.
 
I see that I'm still using a preview version of WCF RIA Services SP2, so I'll upgrade now to see if that's causing the problem.


Posted By: donn
Date Posted: 11-Nov-2011 at 2:38pm


Posted By: WardBell
Date Posted: 11-Nov-2011 at 5:43pm
I am fearing some incompatibility introduced between April and September versions of both SP2 and RiaServices.Toolkit. It DEFINITELY works with latest DevForce and APRIL SP2/TOOLKIT.
Investigating this weekend. Wish us luck. :)


Posted By: donn
Date Posted: 11-Nov-2011 at 6:15pm
Thank You Ward.
You and I met at PDC Underground in LA one or two years back.
Sorry to make you work over the weekend.


Posted By: donn
Date Posted: 20-Dec-2011 at 1:32pm
any word on this yet?
 
Thanks


Posted By: WardBell
Date Posted: 20-Dec-2011 at 5:46pm
Sorry but we haven't returned to this. The RIA/JS project has undergone some dramatic transformations/improvements. I can't describe them but let's just say that a lot has changed. We're holding off until they go public.

Consider the RIA/JS Big Shelf sample we described as a concept-only "proof of concept". Nice to know that a solution is forthcoming. We can tell that THIS approach will involve a RIA Services wrapper around a DevForce model. This has worked and it will work again. But no one should be doing anything serious with the current bits.
 
Keep pinging. We won't let this drop. It's just not smart to invest in this right now with so much that is about to change.


Posted By: blogger
Date Posted: 09-Oct-2012 at 2:47am
Hi Mr WardBell,

I think that the RIA/JS project has become an obligatory requirement due to the switch from Silverlight to HTML5 strategies that is adopted by all platforms, i want to know if there is a progess in this project ? please things has become more serious, and may be the word 'Silverlight' will become an old fashioned expression in the near future.

Best regards



Print Page | Close Window