I have created EF Data Services before but I’m receiving this message everytime I try and create a EF5 – WCF Service Application.
The operation ‘ProcessRequestForMessage’ could not be loaded because
it has a parameter or return type of type
System.ServiceModel.Channels.Message or a type that has
MessageContractAttribute and other parameters of different types. When
using System.ServiceModel.Channels.Message or types with
MessageContractAttribute, the method must not use any other types of
parameters.
- I create the WCF Service Application,
- add references System.Data.Services
- Generate the EF Model
- Changed the Code Generation Strategy to “Default” and deleted the “.tt”
- Inherit the DataService< DBEntities> to my service class (Service1)
- Add the required “InitilizeService” routine
- No changes to web.config
When i try and debug I get the message. I am using VS2012
It was a while ago since i’ve used Data Services but looking at my old VS2010 project that works I have modified web.config to include a service with an endpoint with “System.Data.Services.IRequestHandler” as the contract.
I also tried it again aswell as changing the binding to a “webHttpBinding” That didn’t seem to work either. Any ideas?
If all else fails i guess i can use Open Access ORM with its built in service generation tools because I can atleast get that working.
Best Regards
Chris Leach
Add:
Factory=”System.Data.Services.DataServiceHostFactory, Microsoft.Data.Services, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″