我有一个 wcf 服务。它使用本地 IIS 服务器。
我的 web.config 是:
<?xml version="1.0"?>
<configuration>
<system.web>
<authentication mode="Windows"/>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="InstantMessagingBinding" closeTimeout="00:00:45">
<textMessageEncoding>
<readerQuotas maxStringContentLength="200000" maxArrayLength="200000" />
</textMessageEncoding>
<httpTransport keepAliveEnabled="false" maxReceivedMessageSize="200000" authenticationScheme="Ntlm"/>
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="InstantMessagingBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="Isima.InstantMessaging.WcfService.ContactService" behaviorConfiguration="InstantMessagingBehavior">
<endpoint address=""
binding="customBinding" bindingConfiguration="InstantMessagingBinding"
contract="Isima.InstantMessaging.WcfService.IContactService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
当我运行我的服务时,我得到一个错误
此错误是关于“当 IIS 配置文件的指定部分被锁定在更高级别的配置时,可能会出现此问题。”
为什么会出现这个错误?