gruber
gruber

Reputation: 29737

ScriptResource.axd:5Uncaught TypeError: Object function

I ve pages which use UpdatePanel and randomly I get an error:

ScriptResource.axd:5Uncaught TypeError: Object function Function() { [native code] } has no method '_registerScript'

registration.aspx:67Uncaught TypeError: Cannot read property 'PageRequestManager' of undefined

It only happens on the production environment where are 3 server loadbalance.

But on each of this servers as I tried there was a sittuation when error was and no.

What is going on ?

Upvotes: 2

Views: 4082

Answers (1)

Appleman1234
Appleman1234

Reputation: 16076

Your Javascript function embedded in ScriptResource.axd has no method _registerScript is going on.

You don't specify what .NET or ASP.NET version you are using, so I am not sure if this is due to the changes in ASP AJAX .NET 4 or not, like the related StackOverflow question in the resources links below.

Though from the fact that it is ScriptResource.axd, you probably have something like ScriptManager.RegisterClientScriptResource or ClientScript.RegisterStartupScript, which you don't want in an ASP Update Panel, use ScriptManager.RegisterStartupScript instead.

General things to be aware of with regards to ScriptResource.axd and web farms include

  • The patch level and dlls on all hosts are the same. Related StackOverFlow Question
  • The machine key for validation and decryption is the same host. Relevant StackOverFlow Question, specifically jesal's answer.
  • The loading of the ScriptResource.axd based on the caching due to the timestamp parameter. See here and here

Relevant resources include

Upvotes: 3

Related Questions