WebUIValidation.js -- undefined is null or not an object

S

siddhath

Hi All,
my asp.net applications is using validations controls and it throws
'undefined is null or not an object' error in WebUIValidation.js
Error only happens on few machines if i move the same applications to a
different machine error does not happen.

i tried copying aspnet_client folder from the machine where it worked to the
machine where is did not work and that did not help. i still get the same
error.
more details on error :

*error ocurs in function ValidatorOnLoad() method in WebUIValidation.js
* Page_Validators.length returns 4 but when i look at the Page_Validators in
watch window there are only 2 item in it.
so it fails when scrips acccess it using a index of 2.

i don't know why Page_Validators.length returns 4 when there are only 2
elelments in it and also why it happens only on specfic machines.

thanks
Siddharth
 
M

Mohamad Elarabi [MCPD]

Does the error happen on different clients or the same client?

When you say different machines I'm assuming different web servers but same
web client correct?
 
K

Kalpesh

I am making a wild guess.

Do both the machines have the web applications configured to run
against same .net version?
i.e. it could be possible that server A has your application
configured to run against .net 1.1
and server B might have been configured to run against .net 2.0

Kalpesh
 
M

Mohamad Elarabi [MCPD]

Kalpesh has a valid point. If you find that they're both running the same
version you might need to uninstall and reinstall the client side scripts on
your server using aspnet_regiis.exe. You can do that by browsing in a dos
prompt to the framework version folder, usually
C:\windows\Microsoft.Net\Framework\vX.X.XXXXX and then running a couple of
commands to uninstall and reinstall. Here are the commands assuming you're
running this on .Net version 2.0:

C:\>cd windows\Microsoft.Net\Framework\v2.0.50727
C:\>aspnet_regiis -e <--This uninstalls scripts
C:\>aspnet_regiis -c <--This installs scripts
C:\>iisreset <--This restarts IIS, sites will go down temporarily.

If that doesn't work then you may do the following but after making sure
that all sites on this webserver are .Net 2.0 compatible. The following will
uninstall all versions of the framework from this machine and then reinstall
2.0 to all sites.

C:\>cd windows\Microsoft.Net\Framework\v2.0.50727
C:\>aspnet_regiis -ua <--This uninstalls ASP.Net versions
C:\>aspnet_regiis -r <--This installs ASP.Net 2.0 to all sites
C:\>iisreset <--This restarts IIS, sites will go down temporarily.

Note that this procedure usually takes less than a minute, but if you're not
sure about this or if this is a production server you might need to test this
on a dev box or your workstation, not because it is a problematic process,
not at all, but just so you are confident that you can recover. I won't
recommend the second process if you have 1.1 and 2.0 apps on the same
machine, although you can still do it but this would be missing other
non-generic steps in order to recover the 1.1 apps to working condition and I
don't have enough information to write you these commands. Please let me know
whether this helps or not.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top