Sys. WebForms. PageRequestManager is empty or not an object

Source: Internet
Author: User

This was found for a long time. I tested the page on xp and put it on the windows 2003 Server. I couldn't create a virtual directory, but instead created a website in iis.

Demystifying 'sys is undefined'
Posted Friday, February 02,200 7 AM by chrisri

 

Are you running into this error on your ASP. net ajax enabled web site? Does it only happen on some machines or on some browsers? Here's how you can get to the bottom of it.

Here's a little background on what is happening...

When you have a ScriptManager on a page, ASP. net ajax will render a few script tags to load the various ASP. net ajax Scripts, and some inline Scripts to get everything initialized and running. if you view source on the page as rendered by your browser, you shoshould see something like this:

<Script type = "text/javascript">
Sys. WebForms. PageRequestManager. _ initialize (''scriptmanager1', document. getElementById (''form1 ''));
Sys. WebForms. PageRequestManager. getInstance (). _ updateControls ([], [], [], 90 );
</Script>

When the browser goes to run that code, it's going to keep CT Sys. webForms. pageRequestManager to be defined somewhere. that somewhere happens to be in the other scripts that are loaded from script tags that look like this:

<Script src = "/MyWebApp/ScriptResource. axd? [Snip-long query string] "type =" text/javascript "> </script>

If the browser fails to load those scripts, the script engine can't find the definition for Sys, Sys. WebForms, Sys. WebFormsPageRequestManager, and thus the error.

So why wowould those scripts fail to load? We 've seen several reasons:

1. The browser fails to load the compressed script

This is usually the case if you get the error on IE6, but not on other browsers.

The Script Resource Handler-ScriptResource. axd compresses the scripts before returning them to the browser. In pre-RTM releases, the handler did it all the time for all browsers,

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.