Reputation: 35598
I'm running into an issue when I deploy an MVC 4 application to IIS 7.5. I'm developing in Visual Studio 2013 on Windows 8. When running locally out of Visual Studio in IE11, everything works great. All of my jQuery event handlers/code work correctly. However, when I deploy the application, I get an error stating that addEventListener()
is not a method on document
which I believe (based on my Googleing) is an error that can occur if jQuery does not correctly detect the browser (as IE uses a different method to register event listeners).
The strange part about all of this is that I get the error on the same computer that worked when running from Visual Studio. The only difference is where the files are hosted.
Does this make any sense? I can post code if necessary but this isn't complex Javascript (I'm just registering a button handler when the document is ready). I've also noticed that my bootstrap styles aren't correct, or at least they look different than when running the server locally.
In an attempt to debug this issue, I also turned off the asset optimization on the server with no luck (so the files are served the same way they are served in the development environment).
Upvotes: 0
Views: 83
Reputation: 35598
Turns out the issue was that I was accessing the site via an intranet and the "Use compatibility mode for Intranet sites" was checked... Unchecking that box fixed the issue.
Upvotes: 1