I deployed my application to my IIS server. Javascript / css seems to work when I browse a webpage from an IIS server (although some of the css also don't load). However, when I switch to another machine and browse the web page from the client, none of the Javascript seems to be enabled. There are links to scripts, and when I enter their path into the browser, I can get the file (so this is not a permission problem or a path problem). Yes, the browser on which I am viewing the page has javascript enabled (this is my dev machine, where everything works if I work from visual studio).
Can someone help me figure out what's going on here? Everything works fine in my dev machine.
Edit
Ok, I tried everything that I can find on websites. I tried to add the "bundle" module, removing, adding (as shown below), I tried with and without "runAllManagedModulesForAllRequests", I tried to enable and disable
<compilation debug="false" targetFramework="4.5" />
Nothing seems to work.
<modules runAllManagedModulesForAllRequests="true"> <remove name="UrlRoutingModule-4.0" /> <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" /> <remove name="BundleModule" /> <add name="BundleModule" type="System.Web.Optimization.BundleModule" /> </modules>
I just don’t understand why IIS7 will do something different when you browse the site locally on the server, and one more thing when you browse the site on another machine?
Edit 2
More puzzling. I thought that there might be something wrong with the binding (some assembly is not loaded correctly, who knows), so to test the theory, I commented out all the binding code on my layout and replaced it with hard-coded / javascript style references. Again, it works in development, it works when previewing on the server, but when you go to the client machine, none of the javascript seems to work !!! I installed it on two different IIS servers ... another problem!
Edit 3
chance. It seems like the problem is ... a drum. IE10. I use integrated authentication, so I used only IE. Until I realized that chrome can request / pass credentials. Therefore, I opened the site from Chrome and did not become a problem! I compared html with my local version on my dev machine with html coming from the server, and in addition to the fact that the URLs have an additional element in the path (the site is deployed to a virtual directory), the html is identical. For some reason, IE decided that it would not run javascript from my IIS server, but it would come from all other websites on the Internet. I even used a violinist to double check that all css / javascript are retrieved and received (they even check the temporary files folder after a clean sweep to see if css / js has been downloaded). So, as usual, IE is a piece of crap that causes only headache and suffering. Now, to figure out how to fix it (my organization is 80% IE).