2014-04-09 79 views
0

我想在本地安装一个ASP.NET站点,当我运行调试器时,在代码中没有出现错误,但是当我跳转到该站点时,我看到以下内容:ASP.NET 4/IIS HTTP错误

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration Config File \\?\C:\SecondCity\Website\web.config Requested URL http://localhost:80/ Physical Path
Logon Method Not yet determined Logon User Not yet determined

我该如何解决这个问题,我相信这是一个IIS的问题,但一切我研究的,我不清楚如何解决这一问题。

+0

iis在你的web.config上有读取权限 – Jonesopolis

+0

这可能是由几件事引起的,很可能是一个缺失的部分声明......你可以发布你的web.config文件吗? – FamiliarPie

回答

1

您确定您在应用程序池中设置了correct framework version吗? System.web.extensions在.NET 4.0以下的版本中不会被识别。

0

我认为它与web.config中的配置节相关。您需要添加一段组像下面的

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 

         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> 

          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> 

         <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 

          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 

          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 

请从here

阅读与此相关的文章