1

I have inherited a WCF RIA, Silverlight 4 application that has been dormant for a few years. It is assumed that the code is stable. To get it working I need to install dependencies which were not documented, as far as I can tell.

After installing dependencies based on what information I could gather I am left with the following error.

Operation named 'namereplaced' does not conform to the required signature. Parameter types must be an entity type or one of the predefined serializable types

I already tried uninstalling Ria Services as recommended here. WCF Ria Operation does not conform to the required signature but this leads to more errors.

I've also tried hunting down a specific version of the Ria Services Toolkit as suggest here, but no luck https://social.msdn.microsoft.com/Forums/silverlight/en-US/86f40859-18e8-4ce6-8d8a-a864fbe4e3ac/error-operation-named-createuser-does-not-conform-to-the-required-signature-parameter-types?forum=silverlightwcf

Additionally, I tried setting up a drop retrieved from the client's FTP in IIS and saw the following in the machine Event Log

: The service '/AppName/Services/SomeManager-Web-Services-ImportService.svc' cannot be activated due to an exception during compilation. The exception message is: Operation named 'namereplaced' does not conform to the required signature. Parameter types must be an entity or complex type, a collection of complex types, or one of the predefined serializable types.. ---> System.InvalidOperationException: Operation named 'namereplaced' does not conform to the required signature. Parameter types must be an entity or complex type, a collection of complex types, or one of the predefined serializable types.

However, using an old installer that the IT team found in the old developers files, I was able to set up an instance of the website which does not generate these errors, but is incompatible with the latest version of the database. I haven't found the source for the setup project in source control.

The method in question is defined as follows

 [Invoke(HasSideEffects=true)]
    public void NameReplaced(IEnumerable<ImportRecord> recs)
    {
        foreach (var item in recs)
        {
            UpdateImportRecord(item);
        }
    }

I'd ideally like to resolve this without trying to change the code as an investigation needs to be done on an error in the clients environment, then further updates are required.

EDIT: Included suggestion from Mark W,

 public IQueryable<ImportRecord> GetImportRecords()
        {
            return null;
        }

but the same build error is reported.

Community
  • 1
  • 1
dalevross
  • 510
  • 6
  • 19

2 Answers2

1

Since this project is being resurrected for some purpose, I recommend that you use the latest Visual Studio and move it to Silverlight 5. The thought is why deal with old technology which will frankly hamper the process.

Comment out the things that don't work to until you have a running (not operational though) baseline to start from. Then bring back in the things which are causing problems.

I say this from having worked extensively in both S4 & S5 and frankly (to the code) not much changed; in doing this process, yes the upgrade will have problems but they are not insurmountable. Plus the installs smarts got better for S5 and later versions of Visual Studio.

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
  • I can understand where you're coming from. One of the reasons it is being resurrected is to troubleshoot an issue showing up in production. Ideally, I'd love to keep additional variables out of the mix. – dalevross Feb 07 '15 at 16:02
  • I didn't move the version of Silverlight but installing a later version of WCF Ria Services appears to have done the trick. It seems the sequence of uninstall/re-install steps made some difference as I had installed the same mix of components but could not get it to build previously. – dalevross Feb 09 '15 at 16:16
  • @recursionjm I had a *recent* Silverlight project where the client simply went to a new machine and was required to continue to use VS2010 which gave us problems; the install sequence is strangely cryptic. – ΩmegaMan Feb 09 '15 at 16:25
0

We run RIA Services on a server that does not have it installed. What we did was publish the web site with Copy Local = true on:

  • System.ServiceModel.DomainServices.EntityFramework
  • System.ServiceModel.DomainServices.Hosting
  • System.ServiceModel.DomainServices.Hosting.OData
  • System.ServiceModel.DomainServices.Server

If that is not it - Due to the magic of domain services, the service needs to auto-generate the class type. Only types that are returned from the service are generated. If the domain service does not have a method to return an Iqueryable or Ienumerable of type ImportRecord, you can create a method that returns null - that will be enough for the code to generate.

Those are my 2 first thoughts.

EDIT: This looks like what I'm talking about :previously asked question

Community
  • 1
  • 1
Mark W
  • 1,050
  • 7
  • 15