Jquery Ajax Calling asmx error problem

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.