我想在Windows Server 2016上的IIS 10.0上托管Wcf服务。
我的应用程序池是v2.0
集成和Wcf service
是用3.5.
建立下面web.config
得到
The configuration section 'configsections' cannot be read because it is missing a section declaration.
服务在w8.1 - IIS6.2和older Windows Server versions
上使用相同的配置运行正常。可能会遗漏什么?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configsections>
<sectiongroup name="system.web.extensions" type="system.web.configuration.systemwebextensionssectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
<sectiongroup name="scripting" type="system.web.configuration.scriptingsectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
</sectiongroup>
</sectiongroup>
</configsections>
你应该这样做
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectiongroup name="system.web.extensions" type="system.web.configuration.systemwebextensionssectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
<sectiongroup name="scripting" type="system.web.configuration.scriptingsectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
</sectiongroup>
</sectiongroup>
</configSections>