1,///To allow the use of ASP. NET AJAX to invoke this Web service from a script, uncomment the downstream.
[System.Web.Script.Services.ScriptService]
This error has clearly suggested that there is little chance of making a mistake.
2. Add the following configuration section to the <system.web></system.web> center of Web. config
<webServices>
<protocols>
<add
Name= "HttpSoap"/>
<add
Name= "HttpPost"/>
<add
Name= "HttpGet"/>
<add
Name= "Documentation"/>
</protocols>
</webServices>
I tried, the second method was still invalid, so I went on and found a jquery ajax call. Net
WebService example, so download tried, someone else's code works, compared, the same code why my invalid? The idea of troubleshooting that problem:
After deleting his web. config, it is clear that the problem is still in Web. config, to find the code that might be affected, one sentence to exclude, and finally find:
In the <system.web>
<add verb= "*" Path= "*.asmx"
Validate= "false" Type= "System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, version=3.5.0.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "/>
Have this sentence is effective, remove is invalid, extremely excited, put this sentence to my web.confg, problem solved. It just took two hours!
Jquery Ajax Calling asmx error problem