【发布时间】:2013-02-08 07:22:11
【问题描述】:
我正在开发一个 .net 4.0 Web 应用程序,并将其托管在 IIS 上。在web.config 文件中没有使用<system.web.extensions> 的情况下成功托管了多次应用程序。
应用程序发布时没有任何错误,但是当我尝试使用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>
我可以知道我在这里做错了什么..这真是令人头疼,我已经尝试了大部分在线资源,但都建议将应用程序池设置为.net 4.0,我已经这样做了..
非常感谢您的帮助:)
【问题讨论】:
标签: c# asp.net iis web-config iis-6