I've just created a new data service using the WCF Data Services 4.1 CTP2 release. The service runs fine on localhost but whenever I try to deploy to another web server I get the following error:
The type 'Marshalls.CustomerContactsService.DataService.CustomersContactsDataServic开发者_C百科e', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The type 'Marshalls.CustomerContactsService.DataService.CustomersContactsDataService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
All the required dlls are present in the bin folder of the service, and the IIS settings are the same as every other wcf data service I've ever deployed. The only difference is that this is the first data service I've deployed using the CTP2 dlls. Like I say the service works fine on localhost but nowhere else.
Thanks in advance for any replies.
I've finally figured out the issue. EF4.1 wasn't installed on the web server, the data service in question queries an entity model built using EF4.1. Once I installed this the data service started working.
精彩评论