Has*_*han 4 c# asp.net iis iis-6 web-config
我正在开发一个.net 4.0 Web应用程序,我将它托管在IIS上.应用程序已成功托管多次,无需使用<system.web.extensions>in web.configfile.
应用程序发布时没有任何错误,但是当我尝试使用它IIS并尝试启用 Directory Browsing它时会发出错误The configuration section system.web,extensions cannot be read because its missing a section declaration.我已经从应用程序池中将其设置为.net 4.0应用程序,但仍然提供错误.
以下是我的web.config档案,
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
<httpRuntime requestValidationMode="2.0" executionTimeout="1000" maxRequestLength="2147483647" />
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
Run Code Online (Sandbox Code Playgroud)
我可以知道我在这里做错了什么..这是一个令人头疼的问题,我已经尝试了大部分在线资源,但都建议设置.net 4.0我已经完成的应用程序池.
非常感谢您的帮助 :)
Aro*_*ron 10
<configuration>
<configSections>
<section name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup" />
</configSections>
</configuration>
Run Code Online (Sandbox Code Playgroud)
将其添加到配置部分.奇怪的是它在applicationHost.config中没有默认值