Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Local IIS in windows 8.1 do not load scripts

Avatar of Deraldo Silva
Deraldo Silva asked on
jQuery
4 Comments1 Solution266 ViewsLast Modified:
Hi.
I have a web application using jquery. is the example of Brady Gaster at TechEd 2014.

well. When I run it from IISExpress it runs ok.
When I run it from IIS site, I got to 404 for all scripts. The scripts are referred to as:
     <script src = "Scripts / jquery-2.1.1.js"> </ script>
     <script src = "scripts / jquery.signalR-2.1.2.js"> </ script>
When I run the application, in F12, I got this:

  Resource interpreted the script but Transferred with MIME type text / plain: "http: //localhost/HitCounter/Scripts/jquery-2.1.1.js".
Default.aspx: 10 Resource interpreted the script but Transferred with MIME type text / plain: "http: //localhost/HitCounter/Scripts/jquery.signalR-2.1.2.js".
Because of this, I got an "$  is not defined"

the default.aspx is :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HitCounter.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-2.1.1.js"></script>
    <script src="Scripts/jquery.signalR-2.1.2.js"></script>
    <script type="text/javascript">

            $(function () {
                var con = $.hubConnection();
                var hub = con.createHubProxy('hitCounter');
                hub.on('onHitRecorded', function (i) {
                    $('#hitCount').text(i);
                });
                con.start(function () {
                    hub.invoke('recordHit');
                });

            })

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div id="hitCount" style="font-size: 200px;"></div>
        </div>
    </form>

</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971Flag of Guadeloupe imageMultitechnician
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers