1.找不到System.Web.Script.Services

在VS2005,新建一个WEBSERVICE,为使此WEBSERVICE能给客户端脚本调用,故加上[ScriptService]属性.

但提示"找不到类型或命名空间名称“ScriptService”(是否缺少 using 指令或程序集引用?) ".

添加引用"using System.Web.Script.Services;".

编译还是不通过! 原因是System.Web.Script.Services找不到!

通过查找,是需要在项目中添加System.Web.Extension 引用!

 

2.sys 末定义

在配置文件中的<system.web>节点中加上如下配置:

 

1 <httpHandlers>
2             <remove verb="*" path="*.asmx"/>
3             <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
4             <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"/>
5             <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"/>
6         </httpHandlers>

 

 3.Sys.WebForms.PageRequestManager.getInstance() 方法未定义

将ScriptManager放在script前面

相关文章:

  • 2021-08-13
  • 2021-09-26
  • 2022-12-23
  • 2021-05-14
  • 2021-10-17
  • 2021-11-05
  • 2021-12-12
  • 2020-05-31
猜你喜欢
  • 2022-01-12
  • 2021-09-24
  • 2022-02-07
  • 2021-10-29
  • 2021-12-18
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案