好,终于明白了。
更改此行 %windir%\System32\inetsrv\Config\ApplicationHost.config
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
至
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
如果这还不够
将以下行添加到Web.config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>