WCF发布由于不支持asp.net兼容性而导致服务无法激活启用
2012-06-06 11:36
423 查看
测试发布到虚拟目录中时发生的报错现象,由于不支持asp.net兼容性而导致服务无法激活启用
错误信息:
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.
不要看到英文错误信息就一脸迷茫 人家的错误信息显示的很明显了:
1.web.config中增加<serviceHostingEnvironment aspNetCompatibilityEnabled="false">。注意这个是放在<system.serviceModel>中的
2.在wcf的服务类加上附加属性 AspNetCompatibilityRequirements,如下图
错误信息:
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.
不要看到英文错误信息就一脸迷茫 人家的错误信息显示的很明显了:
1.web.config中增加<serviceHostingEnvironment aspNetCompatibilityEnabled="false">。注意这个是放在<system.serviceModel>中的
2.在wcf的服务类加上附加属性 AspNetCompatibilityRequirements,如下图
相关文章推荐
- WCF发布由于不支持asp.net兼容性而导致服务无法激活启用
- WCF 无法激活服务,由于它不支持 ASP.NET 兼容性。已为此应用程序启用了 ASP.NET 兼容性
- WCF 无法激活服务,因为它不支持 ASP.NET 兼容性。已为此应用程序启用了 ASP.NET 兼容性
- WCF 无法激活服务,因为它不支持 ASP.NET 兼容性。已为此应用程序启用了 ASP.NET 兼容性
- WCF 无法激活服务,因为它不支持 ASP.NET 兼容性。已为此应用程序启用了 ASP.NET 兼容性
- WCF 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性。已为此应用程序启用了 ASP.NET 兼容性。请在 web.config 中关闭 ASP.NET 兼容性模式或将 AspNetCompatibili
- WCF项目问题2-无法激活服务,因为它需要 ASP.NET 兼容性。没有未此应用程序启用 ASP.NET 兼容性。请在 web.config 中启用 ASP.NET 兼容性,或将 AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode 属性设置为 Required 以外的值。
- WCF开发错误处理记录(无法激活服务,因为它不支持 ASP.NET 兼容性)
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 开发错误处理记录(无法激活服务,因为它不支持 ASP.NET 兼容性)
- 无法激活服务,因为它不支持 ASP.NET 兼容性
- 开发错误处理记录(无法激活服务,因为它不支持 ASP.NET 兼容性)
- 开发错误处理记录(无法激活服务,因为它不支持 ASP.NET 兼容性)