views:

288

answers:

4

I deployed my ASP.NET application under an existing virtual directory. The new deployment will have some features using JavaScript. The new features are not working.

If I deploy this build under a new virtual directory, the features using JavaScript are working.

I restarted the IIS Admin service. The problem continues.

What could be going wrong here?

+2  A: 

Since javascript runs on the client, and not on the server, I doubt that IIS, per se, has anything to do with your problem.

What have you done to attempt to diagnose the problem? Have you looked at the network interaction between the browser and the server? Perhaps some script files are not being found.

Have you turned on any debugging tools (for instance, Firebug or the F12 command in IE8)? You may be getting errors you don't know about.

John Saunders
I did not turn on any debugging tools. To diagnose the problem, I inserted alert statements in javascript functions. The browser did not show any alert. Then I deployed that new build under new virtual directory and tested it using the same browser. It is working.
gopal
I'd suggest that, since you are now debugging a problem, that you turn on some debugging! You're not just a user browsing - you actually want to know if there are JavaScript errors. This really sounds like your scripts are not being found.
John Saunders
+2  A: 

Sounds like it could be a caching issue on the browser.

Kevin
I tried it using more browser from different computer. But the problem continues.
gopal
A: 

Is the code that calls the Javascript routines being generated dynamically? If so, it might be a path assumption. Your description was a big vague. For instance, in ASP.NET, you should use "~" to represent the applications current path. This might change. If you have code that just referrs to "/" or another (perhaps the second attempted path), then perhaps it's just a bad assumption? Please provide more specifics. There are a hundred possible scenarios that fit your description.

CleverCoder
A: 
After the deployment if javascript features are not working then it may be beacuse executes the script which already cached. In this case to handle the situation please do the following

Try changing the JavaScript file's src?

From this:

To this:

This method should force your browser to load a new copy of the JS file.

gopal