title: Failed to load resource with SignalR
body: <p>I am new to signalR. I been trying to get this code to work. I am getting an error in the console. 
  <a href="https://i.stack.imgur.com/gLvmU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gLvmU.png" alt="error"></a></p>
  
  <p>I assume that the second error is a product of the first. </p>
  
  <p>I am not sure what this means or how to fix it. I looked at several different tutorials, but I haven't been able to figure it out. I tried searching the interwebs and i couldn't find. I obviously don't have a solid understanding of this and learn best getting my hands dirty (so to speak). I hope someone could help out. Below is my code</p>
  
  <p>Start Up:</p>
  
  <pre><code>using Microsoft.Owin;
  using Owin;
  using SignalR_Test;
  
  namespace SignalR_Test
  {
      public class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              app.MapSignalR();
          }
      }
  }
  </code></pre>
  
  <p>Hub:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using Microsoft.AspNet.SignalR;
  using Microsoft.AspNet.SignalR.Hubs;
  
  namespace SignalR_Test
  {
      [HubName("employeeHub")]//the name through which in js file we init and call hub start fuction. 
      public class EmployeeHub : Hub
      {
          private readonly Employee _employee;
          public EmployeeHub() : this(Employee.Instance)
          {
  
          }
          public EmployeeHub(Employee stockTicker)
          {
              _employee = stockTicker;
          }
          [HubMethodName("getAllEmployee")]
          public IEnumerable&lt;Emp&gt; GetAllEmployee()
          {
              return _employee.GetEmployee();
          }
      }
  }
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml Jump "&gt;
  &lt;head&gt;
      &lt;title&gt;SignalR Example&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script src="Scripts/jquery-1.6.4.js"&gt;&lt;/script&gt;
      &lt;script src="Scripts/jquery.signalR-2.3.0.js"&gt;&lt;/script&gt;
      &lt;script src="../signalr/hubs"&gt;&lt;/script&gt;
      &lt;!--generate a javascript proxy class for our server class--&gt;
      &lt;script&gt;
  
          $(function () {
              var hub = $.connection.employeeHub;
              hub.client.getAllEmployee = function (eItems) {
                  eItems.each(function (i) {
                      $("htmlCode") = "&lt;tr&gt;";
                      $("htmlCode") = $("htmlCode") + "&lt;td&gt;" + this.EmpId + "&lt;/td&gt;&lt;td&gt;" + this.EName + "&lt;/td&gt;&lt;td&gt;" + this.DeptNo + "&lt;/td&gt;"
                      $("htmlCode") = "&lt;/tr&gt;";
                      $("#code").html($("htmlCode"));
                  });
              };
          });
  
      &lt;/script&gt;
      &lt;h1&gt;SqlTableDependencly with SignalR&lt;/h1&gt;
      &lt;div class="col-sm-6"&gt;
          &lt;table class="table table-bordered table-hover table-striped"&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      EmpId
                  &lt;/th&gt;
                  &lt;th&gt;
                      EName
                  &lt;/th&gt;
                  &lt;th&gt;
                      DeptNo
                  &lt;/th&gt;
              &lt;/tr&gt;
              &lt;tbody&gt;
                  &lt;span id="code"&gt;&lt;/span&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>web.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    https://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
           &lt;add name="sqlCon" connectionString="data source=RANCOR\HARDAC;Integrated Security=SSPI;initial catalog=signalR" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.6.1"/&gt;
      &lt;httpRuntime targetFramework="4.6.1"/&gt;
    &lt;/system.web&gt;
    &lt;system.codedom&gt;
      &lt;compilers&gt;
        &lt;compiler language="c#;cs;csharp" extension=".cs"
          type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/&gt;
        &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
          type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+"/&gt;
      &lt;/compilers&gt;
    &lt;/system.codedom&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Made changes to the script section based on the suggestion below. I am stilling getting an error. The error: <code>Failed to load resource: the server responded with a status of 404 (Not Found)</code>
  EDIT index.html </p>
  
  <pre><code>   &lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml Jump "&gt;
  &lt;head&gt;
      &lt;title&gt;SignalR Example&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script src="Scripts/jquery-1.6.4.js"&gt;&lt;/script&gt;
      &lt;script src="Scripts/jquery.signalR-2.3.0.js"&gt;&lt;/script&gt;
      &lt;script src="~/signalr/hubs"&gt;&lt;/script&gt; &lt;!-- ERROR happening here --&gt;
      &lt;!--generate a javascript proxy class for our server class--&gt;
      &lt;script&gt;
  
          $(function () {
              var hub = $.connection.employeeHub;
              // If you like to call methodes on client from server. Do it here
              $.connection.hub.start().done(function () {
                  // In the case the connection is started you call the method on the server
                  hub.client.getAllEmployee = function (eItems) {
                      // Do your stuff here
                      $("htmlCode") = "&lt;tr&gt;";
                      $("htmlCode") = $("htmlCode") + "&lt;td&gt;" + this.EmpId + "&lt;/td&gt;&lt;td&gt;" + this.EName + "&lt;/td&gt;&lt;td&gt;" + this.DeptNo + "&lt;/td&gt;"
                      $("htmlCode") = "&lt;/tr&gt;";
                      $("#code").html($("htmlCode"));
                  }
              });
          });
      &lt;/script&gt;
      &lt;h1&gt;SqlTableDependencly with SignalR&lt;/h1&gt;
      &lt;div class="col-sm-6"&gt;
          &lt;table class="table table-bordered table-hover table-striped"&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      EmpId
                  &lt;/th&gt;
                  &lt;th&gt;
                      EName
                  &lt;/th&gt;
                  &lt;th&gt;
                      DeptNo
                  &lt;/th&gt;
              &lt;/tr&gt;
              &lt;tbody&gt;
                  &lt;span id="code"&gt;&lt;/span&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>EDIT:
  Responding to comment
  I tried variations to get the hub js. 
  1. <code>&lt;script src="/signalr/hubs"&gt;&lt;/script&gt;</code>
  2. <code>&lt;script src="signalr/hubs"&gt;&lt;/script&gt;</code>
  3. <code>&lt;script src="~/signalr/hubs"&gt;&lt;/script&gt;</code>
  4. <code>&lt;script src="../signalr/hubs"&gt;&lt;/script&gt;</code></p>
  
  <p>I also tried to add the following code to Web.config file:</p>
  
  <pre><code>  &lt;appSettings&gt;
      &lt;add key="owin:AutomaticAppStartup" value="true"&gt;&lt;/add&gt;
    &lt;/appSettings&gt;
  </code></pre>