How to solve Ajax type, sys undefined

Source: Internet
Author: User

I haven't moved Ajax for a long time. I suddenly encountered a lot of problems when I was using it. I was prompted that the type was undefined and SYS was undefined. In fact, I have encountered this problem before and solved it. I forgot it after a long time. I will write out the solution today and share it with you.
In fact, it is very simple. Now we need to add the following content in the <system. Web> section of Web. config:
View plaincopy to clipboardprint?
<Httphandlers>
<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 "/>
</Httphandlers>
<Httphandlers>
<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 "/>
</Httphandlers>

OK. The sys undefined problem is solved everywhere, but the WebService definition still exists. Create an empty Ajax enabled web application and observe the Web. config file to find the WebService configuration,
View plaincopy to clipboardprint?
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<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 "/>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<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 "/>

Try to join the above node,
The test is successful. The complete configuration is as follows:

View plaincopy to clipboardprint?
<System. Web>
<Httphandlers>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<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 "/>
<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 "/>
</Httphandlers>
<System. Web>
<Httphandlers>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<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 "/>
<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 "/>
</Httphandlers>
Note: In <system. Web>
That's all.

this article from the csdn blog, reprinted please indicate the source: http://blog.csdn.net/jok127/archive/2009/12/03/4935004.aspx

Related Article

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.