将 WCF 数据服务 (CTP2) 部署到 IIS 时,是否还有其他人遇到 System.InvalidOperationException?
我刚刚使用 WCF Data Services 4.1 CTP2 版本创建了一个新的数据服务。该服务在本地主机上运行良好,但每当我尝试部署到另一个 Web 服务器时,我都会收到以下错误:
类型“Marshalls.CustomerContactsService.DataService.CustomersContactsDataService”,作为 ServiceHost 指令中的 Service 属性值提供,或提供在配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations 中找不到。 描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的详细信息。
异常详细信息:System.InvalidOperationException:类型“Marshalls.CustomerContactsService.DataService.CustomersContactsDataService”作为服务属性提供找不到 ServiceHost 指令中的值,或在配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations 中提供的值。
所有必需的 dll 都存在于服务的 bin 文件夹中,并且 IIS 设置与我部署过的所有其他 WCF 数据服务。唯一的区别是,这是我使用 CTP2 dll 部署的第一个数据服务。就像我说的,该服务在本地主机上运行良好,但在其他地方都运行良好。
预先感谢您的回复。
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.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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于弄清楚了这个问题。 Web 服务器上未安装 EF4.1,相关数据服务查询使用 EF4.1 构建的实体模型。一旦我安装了这个,数据服务就开始工作了。
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.