The web application (after working for a while) starts throwing 'Object
Expected' errors for javascript functions defined in external .js files added
to the webpage using the <script src="..."></script> tag.
The problem is not resolved by doing a 'Hard Refresh' (ctrl+F5) or clearing
the cache in the browser. This problem is persistent in both IE and Firefox,
so I am guessing it is not a browser or code problem, especially since the
code works for a while... (probably the hardest general problem to resolve!)
I am able to resolve the problem in the following two scenarios:
1) The web application is located somewhere on the local disk and a virtual
directory is created in IIS Manager. An application is created in the IIS
manager properties for the virual directory. Two solutions that work
sometimes:
1a) "Remove" application in IIS Manager's properties for the virtual directory
1b) If Solution (a) does not work, the virtual directory has to be recreated
using a different name
1c) If Solution (b) does not work, make a folder in your wwwroot for the
application and simply copy it there (and in most cases this solves the
problem)
2) The web application is located in the wwwroot of your website in a
seperate folder. An application is created in the IIS manager properties for
the folder. The only solution:
2a) "Remove" application in IIS Manager's properties for the folder (and
hope that it doesn't happen again)
This ofcourse cannot continue to happen at a client!! So there must be a
reason why it happens? Any ideas?
Scope:
-IIS 5.0 (Windows Server 2000) - scarce, IIS 5.5 (Windows XP) - routinely,
IIS 6.0 Windows Server 2003) - scarce
-ASP-based web application
Regards,
M Johnson
>> Stay informed about: IIS stops serving *.js files - Object Expected error occur..