Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updated ASP.NET 3.5 to 4.0 -> Sys.WebForms.PageRequestManager is undefined

As the title indicates, I recently updated an ASP.NET 3.5 application containing UpdatePanels and similar AJAX technologies to ASP.NET 4.0. Unfortunately, the UpdatePanels work no more and full page postbacks makes it all go south.

Web.config-file

 <?xml version="1.0"?>
 <configuration>
    <configSections>
        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"/>
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging"/>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/>
    </configSections>
    <system.net>
        <mailSettings>
            <smtp>
                <network host="localhost"/>
            </smtp>
        </mailSettings>
    </system.net>
    <system.web>
        <!--
             The <authentication> section enables configuration 
             of the security authentication mode used by 
             ASP.NET to identify an incoming user. 
         -->
        <authentication mode="Forms">
            <forms loginUrl="~/Login.aspx" name=".ASPXFORMSAUTH" defaultUrl="~/Administration/SystemEvents.aspx"/>
        </authentication>
        <!--
             The <customErrors> section enables configuration 
             of what to do if/when an unhandled error occurs 
             during the execution of a request. Specifically, 
             it enables developers to configure html error pages 
             to be displayed in place of a error stack trace. -->
        <customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx">
            <error statusCode="401" redirect="~/Unauthorized.aspx"/>
        </customErrors>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
 </configuration>

Javascript error upon execution in Chrome:

Uncaught TypeError: Object function Function() { [native code] } has no method '_registerScript'
Uncaught TypeError: Cannot read property 'PageRequestManager' of undefined

What is there that I could've done wrong? Thank you!

like image 459
Leonard Avatar asked Jan 04 '12 10:01

Leonard


1 Answers

Set EnablePartialRendering="false" in ScriptManager

like image 157
ErTR Avatar answered Oct 12 '22 23:10

ErTR