Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy are my Script Bundles only working on Server
    primarykey
    data
    text
    <p>I have deployed my app to my IIS server. The javascript/css seem to work when I browse the webpage from the IIS server (although some of the css seems to not be loading as well). However, when I go to another machine and view the webpage from a client, none of the Javascript seems to be enabled. The links to the scripts are there, and when I type their path into the browser, I am able to retrieve the file (so it's not a permissions issue or a path issue). Yes the browser I am viewing the page from has javascript enabled (it's my dev machine where everything works if I'm working from visual studio).</p> <p>Can anyone help me figure out what is happening here? Everything works fine in my dev machine.</p> <hr> <h2>Edit</h2> <p>Ok I have tried everything I can find on the interwebs. I have tried adding the 'bundle' module, removing then adding (as below), I have tried with and without 'runAllManagedModulesForAllRequests', I have tried enableing and disabling the </p> <pre><code>&lt;compilation debug="false" targetFramework="4.5" /&gt; </code></pre> <p>Nothing seems to work.</p> <pre><code>&lt;modules runAllManagedModulesForAllRequests="true"&gt; &lt;remove name="UrlRoutingModule-4.0" /&gt; &lt;add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" /&gt; &lt;remove name="BundleModule" /&gt; &lt;add name="BundleModule" type="System.Web.Optimization.BundleModule" /&gt; &lt;!-- any other modules you want to run in MVC e.g. FormsAuthentication, Roles etc. --&gt; &lt;/modules&gt; </code></pre> <p>I just don't understand why IIS7 would be doing something different when you browse the website locally on the server and another thing when you browse the site on different machine?</p> <hr> <h2>Edit 2</h2> <p>Even more baffling. I figured there might be something wrong with bundling (some assembly not loaded correctly who knows) so to test the theory, I commented out all the bundling code on my layout and replaced it with hard coded links to the styles/javascript. Again, it works in development, it works when previewing on the server, but when you go to a client machine, none of the javascript seems to work!!! I've installed it on two different IIS servers now... still same problem!</p> <hr> <h2>Edit 3</h2> <p>Unbelievable. It looks like the problem is... drum roll. IE10. I am using integrated authentication so I was only using IE. Until I realised that chrome can prompt/pass credentials as well. So I opened the site from Chrome and no problem! I compared the html from my local version on my dev machine to the html coming from the server, and other than the fact that the URLs have an extra element in the path (the site is deployed to a virtual directory) the html is identical. So for whatever reason, IE has decided that it will not run javascript from my IIS server, but it will from every other website on the internet. I even used fiddler to double check that all of the css/javascript was being fetched and received (they are, even checked the temporary files folder after a clean sweep to see if the css/js was downloaded). So, as usual, IE is a piece of crap causing nothing but headache and misery. Now to figure out how to fix this (my organisation is 80% IE).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload