我在本地计算机(32位计算机)上托管Wcf应用程序。我收到以下错误。
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
附加相同的Config文件详细信息。
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WcfServiceDemo.ServiceCalculateCost" >
<endpoint address="" binding="wsHttpBinding" contract="WcfServiceDemo.IServiceCalculateCost"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
答案 0 :(得分:0)
IIS 7实现“配置锁定”。这有助于IIS管理。
在此处,请查看错误详情以及如何解决错误:IIS 7 – This configuration section cannot be used at this path.
根据它,决议之一:
打开位于此处的applicationHost.config
文件:%windir%\system32\inetsrv\config\applicationHost.config
修改“handlers
”部分。
更改此行:
<section name=”handlers” overrideModeDefault=”Deny” />
要:
<section name=”handlers” overrideModeDefault=”Allow” />