The service cannot be activated because it does not support ASP.NET compatibility
2015-09-29 14:43
661 查看
部署WCF时遇到这么个错:
"The service cannot be activated because it does not supportASP.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'."
长长的一大串看着很吓人,但按其中的提示来操作就行了,第一种“Turn off ASP.NET compatibility mode in the
web.config”,在web配置文件里搜“serviceHostingEnvironment”,默认的配置是这样的
把前面那个true改成false即可,如果配置文件里没有这句加上即可,加在system.serviceModel中。或者第二种即在契约类名头部加段配置就行,记得先引用相应的命名空间,不然无法智能提示,按照提示设置成Allowed或者Required.这两种方式选择其中一种设置即可。
"The service cannot be activated because it does not supportASP.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'."
长长的一大串看着很吓人,但按其中的提示来操作就行了,第一种“Turn off ASP.NET compatibility mode in the
web.config”,在web配置文件里搜“serviceHostingEnvironment”,默认的配置是这样的
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
把前面那个true改成false即可,如果配置文件里没有这句加上即可,加在system.serviceModel中。或者第二种即在契约类名头部加段配置就行,记得先引用相应的命名空间,不然无法智能提示,按照提示设置成Allowed或者Required.这两种方式选择其中一种设置即可。
相关文章推荐
- The service cannot be activated because it does not support ASP.NET compatibility
- The service cannot be activated because it does not support ASP.NET compatibility
- The service cannot be activated because it does not support ASP.NET compatibility
- java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
- python Aspscheduler 定时任务框架使用
- compilation 元素(ASP.NET 设置架构)
- ASP.NET 动态编译、预编译和 WebDeployment 项目(转)
- MVC中如何使用Model验证
- 在iis上部署asp.net mvc2.0
- ASP.NET优化性能方法之一禁用调试模式(转)
- Temporary ASP.NET Files 文件夹中保存的是什么内容?[转]
- asp.net Web项目中使用Log4Net进行错误日志记录
- ASP.NET MVC (Razor)开发<<周报与绩效考核系统>>,并免费提供园友们使用~~~
- c#开发之七---asp.net
- ASP.NET MVC (Razor)开发
- asp.net中try catch finally中含有return时的执行顺序
- asp.net5开发中DNX SDK版本的影响
- ASP.NET 动态属性筛选和分页绑定
- ASP.NET 微信支付
- cs0006 未能找到元数据文件 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files