AJAX.NET 2.0 SYS未定义 解决方法

配置文件一般都会缺少<httpHandlers></httpHandlers>  这一段,

还有就是 <asp:SrciptManager> 控件一定要紧跟在<form>后面

具体配置如下:

1 <system.web>
2     <!--
3               设置 compilation debug="true" 将调试符号插入
4               已编译的页面中。但由于这会
5               影响性能,因此只在开发过程中将此值
6               设置为 true。
7         -->
8     <compilation debug="true">
9       <assemblies>
10         <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
11         <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
12         <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
13         <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
14       </assemblies>
15     </compilation>
16     <!--
17               通过 <authentication> 节可以配置 ASP.NET 使用的
18               安全身份验证模式,
19               以标识传入的用户。
20         -->
 <httpHandlers>
       <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
       <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"/>
       <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"/>
     </httpHandlers>

27
28     <authentication mode="Windows"/>
29     <!--
30               如果在执行请求的过程中出现未1 <system.web>
2     <!--
3               设置 compilation debug="true" 将调试符号插入
4               已编译的页面中。但由于这会
5               影响性能,因此只在开发过程中将此值
6               设置为 true。
7         -->
8     <compilation debug="true">
9       <assemblies>
10         <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
11         <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
12         <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
13         <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
14       </assemblies>
15     </compilation>
16     <!--
17               通过 <authentication> 节可以配置 ASP.NET 使用的
18               安全身份验证模式,
19               以标识传入的用户。
20         -->
21     <httpHandlers>
22       <remove verb="*" path="*.asmx"/>
23       <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
24       <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"/>
25       <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"/>
26     </httpHandlers>
27
28     <authentication mode="Windows"/>
29     <!--
30               如果在执行请求的过程中出现未处理的错误,
31               则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
32               开发人员通过该节可以配置
33               要显示的 html 错误页
34               以代替错误堆栈跟踪。
35
36           <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
37               <error statusCode="403" redirect="NoAccess.htm" />
38               <error statusCode="404" redirect="FileNotFound.htm" />
39           </customErrors>
40         -->
41   </system.web>
处理的错误,
31               则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
32               开发人员通过该节可以配置
33               要显示的 html 错误页
34               以代替错误堆栈跟踪。
35
36           <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
37               <error statusCode="403" redirect="NoAccess.htm" />
38               <error statusCode="404" redirect="FileNotFound.htm" />
39           </customErrors>
40         -->
41   </system.web>

转载于:https://www.cnblogs.com/netkey/articles/1102065.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值