Click here to Skip to main content
15,844,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have an issue that only happens when the application is loaded on the IIS web server.

When run locally, the problem doesn't occur.

The css file and javascript file are in subfolder and linked using relative paths.

Running the app on IIS, some of the JavaScript functions don't run, but some do.

Running the app on IIS, some of the css is rendered and some are not.

For example, my button backgrounds are blue consistently, but some table spacing/padding (?) are not the same as anticipated.

Using the same laptop and same browser (IE 9) the locally run app runs all javascript functions and renders all css classes properly.

I have no idea how to figure out what could be going on.

One other note: the server is locked down so that I cannot connect to it remotely for debugging with VS. I can only copy the files there and remote desktop to it.

Updated 30-Aug-12 4:47am
Sandip.Nascar 29-Aug-12 18:17pm    
It seems a caching issue. It often happens after we publish the file to the server.
Try clearing your cache and see.
ARBebopKid 30-Aug-12 9:46am    
Unfortunately, that's not it for this case.

I can even change the css and see colors change, but something is affecting the table/cell spacing/padding/placement differently on the server.

enhzflep 30-Aug-12 9:59am    
Then the next thing I would do would be to debug the page. I'd check affected elements 1 by 1, comparing the applied style with those specified in the css. Any browser would work fine, though my first choice would be for Chrome, followed by Opera then IE - but it's likely just personal preference.
F12 - IE
Ctrl-Shift-I - Chrome, Opera

Of course, you could always open the page that's stored on the server, save a local copy *using your webbrowser* then compare the saved data with that whih should have been displayed. It should be pretty trivial to isolate exactly which rules/scripts exhibit odd behaviour.
ARBebopKid 30-Aug-12 10:02am    
Thanks for the idea. I have now created a flat html copy of the server output and the local output and beginning to compare them line be line.

As for browser, the client specified IE as the supported browser, otherwise, IE would be last on my list.
enhzflep 30-Aug-12 10:16am    
Yeah, you should find the difference pretty quickly by comparing the files.
The command-line tool "comp" should have the job done in anywhere from seconds to minutes, depending on the number of files in the site.

I only mention my preference for the browser to use to do the debugging -
being really comfortable with the Chrome debugging tools - but similarly, find myself using IE only when compelled to by external forces. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900