user1269625
user1269625

Reputation: 3209

ASP.NET 4 / IIS HTTP Error

I am trying to setup an ASP.NET site locally, When I run the debugger I get no errors in the code, but when I goto the site I see the following:

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

How do I fix this, I believe this is an IIS issue, but everything I have researched is not clear to me how to fix this.

Upvotes: 0

Views: 168

Answers (2)

Akhil
Akhil

Reputation: 2030

I think it is related to configuration sections in web.config. You need add section group like below in the

                 <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"/>

Please read the articles related to this from here

Upvotes: 0

Adam Caviness
Adam Caviness

Reputation: 3484

Are you certain that you have the correct framework version set in your application pool? System.web.extensions will not be recognized in anything lower than .NET 4.0.

Upvotes: 1

Related Questions