只能从脚本中调用在类定义上有[ScriptService]属性的Web服务问题的解决方案

ajax调用webservice中的接口时, 会出现[只能从脚本中调用在类定义上有[ScriptService]属性的...]的异常.

这是因为, 在.net3.5中, 访问web服务, 要对web服务添加修饰:

[System.Web.Script.Services.ScriptService]
posted @ 2016-05-17 18:00  姑苏慕容复  阅读(3180)  评论(0编辑  收藏  举报