我正在使用jQuery内联表单验证引擎,但不幸的是,我不知道为什么我的web方法没有点击。我可以从提示器中看到请求正在发送到服务器,但是HTTP:500错误与该请求有关。
Webservice方法:
[WebMethod]
public bool IsUserAvailable(string fieldId, string fieldValue, string extraData, string _)
{
return true;
}规则:
"ajaxUserCallAsp": {
"url": "Services/FWWebService.asmx/IsUserAvailable",
// you may want to pass extra data on the ajax call
"extraData": "name=eric",
// if you provide an "alertTextOk", it will show as a green prompt when the field validates
"alertTextOk": "* This username is available",
"alertText": "* This user is already taken",
"alertTextLoad": "* Validating, please wait"
},Fiddler显示请求头:
获取/ForeverWords.Website/Services/FWWebService.asmx/IsUserAvailable?fieldId=Text1&fieldValue=sd&extraData=d&&_=1324507733538 HTTP/1.1
发布于 2011-12-21 23:33:13
这个问题已经解决了,现在它正在打击web方法。
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>https://stackoverflow.com/questions/8597520
复制相似问题