在<configuration />中加入以下声明
<
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"
>
<
section
name
=
"scriptResourceHandler"
type
=
"System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
<
sectionGroup
name
=
"webServices"
type
=
"System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
>
<
section
name
=
"jsonSerialization"
type
=
"System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission
=
"false"
allowDefinition
=
"Everywhere"
/>
<
section
name
=
"profileService"
type
=
"System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
<
section
name
=
"authenticationService"
type
=
"System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission
=
"false"
allowDefinition
=
"MachineToApplication"
/>
</
sectionGroup
>
</
sectionGroup
>
</
sectionGroup
>
</
configSections
>