Jquery is not getting loaded in windows server 2008 R2 IIS RRS feed

  • Question

  • User1712079085 posted


    I added java script in master page as follows:

    <script src="../Content/js/jquery-3.2.1.min.js"></script>
    <script src="../Content/js/bootstrap.min.js"></script>

    When i trying to run in local IIS express is working fine without any error. But after published to IIS on windows server 2008 R2 is not loading jquery and java script files instead it shows as blank file without showing any error.


    Sunday, February 18, 2018 1:42 PM

All replies

  • User475983607 posted

    The most likely cause is the src is wrong.  Try referencing the files from the application root.  The following code assumes the mater page head element has the runat="server" attribute.

    <script src="~/Content/js/jquery-3.2.1.min.js"></script>
    <script src="~/Content/js/bootstrap.min.js"></script>

    You can figure this out on your own by opening the browser's developer tools (F12) and opening the Network tab.  Refresh the page while viewing the Network tab and you'll 404 errors as the path is not correct.

    Sunday, February 18, 2018 1:51 PM
  • User1712079085 posted

    Yes. it is still not working in IE

    Sunday, February 18, 2018 2:12 PM
  • User475983607 posted
    Does the folder and files exist on the server? Are you seeing 404 errors in dev tools.

    Are you sure IIS is configured correctly? A blank page can indicate other issues with the web app. You’ll need to do a bit of troubleshooting.
    Sunday, February 18, 2018 3:20 PM
  • User1712079085 posted

    this is what am getting error

    Unhandled exception at line 2, column 29928 in http://localhost:56591/Content/js/jquery-2.2.4.min.js

    0x800a01b6 - Microsoft JScript runtime error: Object doesn't support this property or method

    IE 8 only throws this exception. Chrome and other browsers doesn't throw any exception

    Monday, February 19, 2018 8:39 AM
  • User753101303 posted


    If I remember starting with jQuery 2.x support for IE8 was dropped. Do you really have to support this one?  You may have to downgrade to a previous version if you can. Or you'll have to take as a fact that IE8 is really outdated.

    Edit: seems confirmed at http://blog.jquery.com/2013/04/18/jquery-2-0-released/ : if you need IE8 support you are stuck to the lastest 1.x version.

    Monday, February 19, 2018 9:00 AM
  • User-707554951 posted

    Hi csureshcse:

    Make sure that you have added jQuery.min.js to the script bundle

    If you still have problem, please see how Fixing Error: Microsoft JScript runtime error: Object expected:


    Best regards


    Tuesday, February 20, 2018 3:09 AM