1.configuration下增加一個子標籤
<configSections><br /><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><br /><sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><br /><section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><br /><sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"><br /><section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/><br /><section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><br /><section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/><br /></sectionGroup><br /></sectionGroup><br /></sectionGroup><br /></configSections>
2.pages下增加一個子標籤
<controls><br /> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /> </controls>
3.在system.web下增加子標籤,與pages平級
<httpHandlers><br /><remove verb="*" path="*.asmx"/><br /><add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /><add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /><add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><br /></httpHandlers><br /><httpModules><br /><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /></httpModules>
4.在configuration下增加最後兩個子標籤
<system.web.extensions><br /><scripting><br /><webServices><br /><!-- Uncomment this line to customize maxJsonLength and add a custom converter --><br /><!--<br /> <jsonSerialization maxJsonLength="500"><br /> <converters><br /> <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/><br /> </converters><br /> </jsonSerialization><br /> --><br /><!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --><br /><!--<br /> <authenticationService enabled="true" requireSSL = "true|false"/><br /> --><br /><!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved<br /> and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and<br /> writeAccessProperties attributes. --><br /><!--<br /> <profileService enabled="true"<br /> readAccessProperties="propertyname1,propertyname2"<br /> writeAccessProperties="propertyname1,propertyname2" /><br /> --><br /></webServices><br /><!--<br /> <scriptResourceHandler enableCompression="true" enableCaching="true" /><br /> --><br /></scripting><br /></system.web.extensions><br /><system.webServer><br /><validation validateIntegratedModeConfiguration="false"/><br /><modules><br /><add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /></modules><br /><handlers><br /><remove name="WebServiceHandlerFactory-Integrated"/><br /><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br /></handlers><br /></system.webServer>