我想在Windows Server 2016上的IIS 10.0上托管Wcf服务。
我的应用程序池 v2.0
已集成,而Wcf service
是使用 3.5.
构建的 web.config
以下获取< / p>
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>
答案 0 :(得分:1)
你应该这样做
<?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>