Cannot Add Service Reference - Silverlight

9 posts, 0 answers
  1. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 19 Jun 2010 Link to this post

    After I used the DSW to reverse map my DB, I tried to add a service reference to my Silverlight project and got this message:

    The server encountered an error processing the request.

    The exception message is 'On data context type 'DataManager', there is a top
    IQueryable property 'ControlTypeNs' whose element type is not an entity type.

    Make sure that the IQueryable property is of entity type or specify
    the IgnoreProperties attribute on the data context type to ignore this
    property.'.

    See server logs for more details. The exception stack trace is:  at
    System.Data.Services.Providers.ReflectionServiceProvider.PopulateMetadata...


    It looks to me like the element type (ControlTypeN) is an entity type, so I tried specifying IgnoreProperties.  Then I got this message:

    The server encountered an error processing the request.

    The exception message is 'ETag attribute must specify at least one property name.
    Parameter name: propertyNames'.

    See server logs for more details. The exception stack trace is: at
    System.Data.Services.IgnorePropertiesAttribute..ctor...


    Can you help?

    I did find one place in the generated code (for the class derived from OpenAccessContext) that contained Controltypens instead of ControlTypeNs.  I thought there might be a case problem in the generated code, but changing it did not help.
  2. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 19 Jun 2010 Link to this post

    I have opened ticket 320489 and attached the project.
  3. DevCraft banner
  4. Missing user
    Missing user avatar

    Posted 21 Jun 2010 Link to this post

    Hi James,

    I would like just to inform you that I have received your attached file and I will write to you as soon as I find the problem.

    I suggest that we continue the discussion regarding this problem here so we do not have to write in two different threads.

    Kind regards,
    Rizk Sobhi
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Missing user
    Missing user avatar

    Posted 25 Jun 2010 Link to this post

    Hello James,

    Let me apologize for the late reply, I had a look into the project that you had attached in your previous letter and I noticed that you have selected to generate Views along with the database tables as part of your RLINQ model. However OpenAccess requires identity selection for all of the classes that are mapped to views, so the user has to select primary key properties for each of them manually. Otherwise, this leads to the generation of a DalDataServiceKeys class containing the properties of the classes mapped to views but without their primary keys specified.

    I would suggest you to delete any view properties existing at this class and ignore them in the DataManager class as well. This is only a temporary workaround as we have already provided a fix for this behavior and it will be available as part of the Q2 release, three weeks from now.

    I tried this solution in a simple project using the Northwind database and I have attached it so you can use it as a reference towards your fix.
    Please have a look at this project, especially at the DataManager and DalDataServiceKey classes.
    Hope that helps

    Sincerely yours,
    Rizk Sobhi
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 27 Jun 2010 Link to this post

    I installed the latest version of ORM and then created a new solution from scratch, not including any views when I added the domain model.  I get the same message, although in a popup this time.  I am not able to identify any differences between your project and mine.  I have looked at ControlTypeN in the rlinq file, and all the properties look correct to me.

    Again, I will post the solution in the ticket.

    BTW, is there some way to find stuff in the graphical representation of the rlinq file?  It seems pretty much useless, so I use the xml version.
  7. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 16 Jul 2010 Link to this post

    Hello James,

    About finding things in the DSL designer, actually there already is such functionality.
    Both the model explorer and the schema explorer have a search bar on top that allows for easy searching in both the relational model and in the object model.
    I hope this helps.

    Sincerely yours,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 16 Jul 2010 Link to this post

    Perfect. Thank you.
  9. mickael
    mickael avatar
    1 posts
    Member since:
    Jul 2010

    Posted 29 Jul 2010 Link to this post

    Hello, i reopen the subject because i have a probleme with the DalDataServiceKey.cs .
    Indeed i follow the quickstart tutorial (Getting Started > Quickstart > Quickstart - Silverlight 4 > Using WCF Data Services > Walkthrough: Creating a WCF Data Services Solution ), i follow each step, then in the data service wizard, on the last step with the summary i got this :

     3. Add the files listed below to ORM_SL.Web.
        1. SampleServiceName.svc
        2. SampleServiceName.svc.cs
        3. DataManager.cs

     4. Add the references listed below to ORM_SL.Web.
        1. System.Data.Entity.dll
        2. System.Data.Services.dll
        3. System.Data.Services.Client.dll
        4. System.ServiceModel.dll
        5. System.ServiceModel.Web.dll
     
     5. Add the files listed below to ORM_SL.Web.
        1. DalDataServiceKeys.cs

     6. Add the references listed below to ORM_SL.Web.
       1. System.Data.Services.Client.dll

    But the problème is that the DalDataServiceKeys.cs is not created, i must do it manualy .
    I have just downloaded the sowftare so i think i get the last version.
    What i done bad?
    Thanks you !

    ps:Sorry for my bad english!

  10. Missing user
    Missing user avatar

    Posted 30 Jul 2010 Link to this post

    Hi mickael,

    Actually we have discovered this problem with the wizard when creating a web application or web site which contains the .rlinq model as well as the generated service. So a simple workaround is to separate the model away from the service, so you can create a class library which contains the model, and another web application or web site to hold the service.
    We already have the fix which will be included at the upcoming version, so you should not experience this problem again.
    Sorry for inconvenience
    .
    Regards,
    Rizk Sobhi
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner