These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Error: 'null' is null or not an object

Hi,

I can compile and run the example code on my local machine, but when I compile and attempt to run it on the web server, I get this error:
Line: 13
Error: 'null' is null or not an object.

I have made no modifications to the source other than to specify the root directory. Any thoughts?
Eric 6/30/2008 1:42 PM
I guess you are getting a javascript error from the browser. This may be caused by external JS code from your host page and not by the control itself. I recommend you to test with Firefox and see the exact line number and error message in the "Error Console".
Cem Alacayir 7/7/2008 7:43 AM
That would be interesting, but there is no external JS code. I am trying to run the example as provided...
Eric 7/9/2008 2:46 PM
To be clear, it is a JS error, but it's in the example code provided. The eact same code works if run from Visual Studio Web Edition 2008 (local web server), but fails with " 'null' is not null or an object " on this line in filevista.js:

function onLanguageXmlComplete(xmlHttp){var xmlDoc=xmlHttp.responseXML;var stringsNode=xmlDoc.getElementsByTagName("Strings")[0];var stringNodes=stringsNode.getElementsByTagName("String");language=new Language();for(var i=0;i<stringNodes.length;i++)


Eric 7/9/2008 3:00 PM
It appears that if you set the FileVistaControl sub-directory as an application, it causes this error. Removing the application setting in IIS resolved the issue.
Eric 7/10/2008 2:34 PM
Yes, you shouldn't set the FileVistaControl subfolder as an application because it's not a standalone web application, it should be just included as a control subfolder under your main application. You were receiving the error because the control was mapping the path of resources (language file etc.) wrongly because of the changed application root.
Cem Alacayir 7/10/2008 4:48 PM
I'm getting the same error in my browser's javascript. I do not have the /FileVistaControl set as a directory. Is there anything else you can suggest? below is the line number where the error is returned:

xmlDoc is null
/FileVistaControl/scripts/filevista.js:12

when i click on the error in firefox it takes me to this line:

function onLanguageXmlComplete(xmlHttp){var xmlDoc=xmlHttp.responseXML;var stringsNode=xmlDoc.getElementsByTagName("Strings")[0];var stringNodes=stringsNode.getElementsByTagName("String");language=new Language();for(var i=0;i<stringNodes.length;i++)
Daniel 9/5/2008 2:43 PM
I am also getting this same error, same method (onLanguageXmlComplete), I have to refresh the page a couple of times for it to work.  FileVistaControl folder is not set as an Application.  Is there any solution to this?
Jason 9/12/2008 8:14 AM
It looks like the stringsNode variable is the one causing the error.
Jason 9/18/2008 2:26 PM
Jason,

Make sure that none of the subdirectories of FileVistaControl are set as applications in IIS manager. You are see the same error is the same code fragment that I was getting.
Eric 9/26/2008 7:26 AM
I get the same error as described, but the FileVistaControl is not an application - the root folder is but none of the subfolders.  I'm running IIS 7.  Could there be something else.
Cory 10/1/2008 1:05 PM
I had the same problem today.  It was caused by having a separate web.config file in the folder where I was attempting to use the file vista control.  I removed all settings from the web.config except for my identity impersonate, and the control started working again.
Steve 10/2/2008 6:20 AM
I only have a web.config in the root folder not in the directory where the control is being launched from.  This is getting frustrating - great product but so touchy and difficult to get running.
Cory 10/7/2008 7:26 AM
Hi Cory,
Are you sure that you include all the settings required for FileVistaControl in the web.config file?

Please paste the contents of your web.config so that we can see if there is anything missing.
Cem Alacayir 10/14/2008 2:47 PM