Solutions to problems with asp. Net built-in ajax

Source: Internet
Author: User

When ScriptMange is used, the "Microsoft JScript runtime error: 'sys 'is undefined" error occurs. When debugging, the system reports that debugging data cannot be debugged. The following error occurs:

<System. web>

<Compilation debug = "true" targetFramework = "4.0"/>

<HttpHandlers>

<Remove verb = "*" path = "*. asmx"/>

<Add verb = "*" path = "*. asmx" validate = "false" type = "System. Web. Script. Services. ScriptHandlerFactory"/>

<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>

 

There are two solutions available on the Internet: add one in <system: web> in web. config:

1: <remove verb = "*" path = "*. asmx"/>
<Add verb = "*" path = "*. asmx "validate =" false "type =" Microsoft. web. script. services. scriptHandlerFactory, Microsoft. web. extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "/>
<Add verb = "GET" path = "ScriptResource. axd" type = "Microsoft. Web. Handlers. ScriptResourceHandler" validate = "false"/>

There is no problem with this kind of computer at home, and this problem still occurs on the company's computer (it should be said that the computer at home does not need to be assigned this also does not have this problem)

2. <remove verb = "*" path = "*. asmx"/>
<Add verb = "*" path = "*. asmx" validate = "false" type = "System. Web. Script. Services. ScriptHandlerFactory"/>
<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 "/>

So there will be no problems.
 

 

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.