首页 > Web开发 > 详细

webconfig文件serviceHostingEnvironment节点出错的解决方法

时间:2015-10-29 12:40:33      阅读:261      评论:0      收藏:0      [点我收藏+]

在三点五和二版本的配置中可以出现这个节点,但是在4.0是没有的,所以如果框架是4.0的时候要除去这个节点,不然就会报以下错误:

 

 

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition=‘MachineToApplication‘ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 180: </runtime>
Line 181: <system.serviceModel>
Line 182: <serviceHostingEnvironment aspNetCompatibilityEnabled="false"/>
Line 183: <behaviors>
Line 184: <endpointBehaviors>

 

这个节点的作用如MSDN介绍的一样。是

 

 

一个布尔值,指示是否已为当前应用程序启用了 ASP.NET 兼容模式。默认值为 false

当此属性设置为 true 时,对 Windows Communication Foundation (WCF) 服务的请求将流经 ASP.NET HTTP 管道,而通过非 HTTP 协议的通信将被禁止。有关更多信息,请参见WCF Services and ASP.NET

 

 

他的作用简而言之就是WCF程序访问session时候才用得到

webconfig文件serviceHostingEnvironment节点出错的解决方法

原文:http://www.cnblogs.com/llcdbk/p/4919880.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!