title: Signalr Hubs Not found (403)
body: <p>Right, so I've seen loads of questions about this, but none of the suggested fixes have worked for me.</p>
  
  <p>I have a MVC4 project running in Visual Studio 2012/IIS Express, using SignalR to do some feedback to users. When I run the project I get a 403 error in Chrome like such:</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 403 (Forbidden) http://{website}/Hubs/
  
  
  Uncaught Error: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. &lt;script src='/signalr/hubs'&gt;&lt;/script&gt;.
  </code></pre>
  
  <p>Obviously I've changed the actual domain on my machine to {website}</p>
  
  <p>Now, originally I had it in a folder called signalr in the root of my web project with a subfolder of hubs, but then I read on the SignalR GitHub that you shouldn't do that, so i changed it to just 'Hubs'. Still didnt fix it.</p>
  
  <p>I've also seen the fix regarding putting your RouteTable.Routes.MapHubs(); in the right order. Mine looks like this:</p>
  
  <pre><code>    protected void Application_Start()
      {
          AreaRegistration.RegisterAllAreas();
  
          RouteTable.Routes.MapHubs();
  
          WebApiConfig.Register(GlobalConfiguration.Configuration);
          FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
          RouteConfig.RegisterRoutes(RouteTable.Routes);
          BundleConfig.RegisterBundles(BundleTable.Bundles);
      }
  </code></pre>
  
  <p>I've also seen some people suggesting passing in your route as a parameter into the MapHubs() method, but that takes a string and a HubConfiguration object as a parameter so that's not working either.</p>
  
  <p>My view code looks like this:</p>
  
  <pre><code>@using(Html.BeginForm("Report", "Home", FormMethod.Post, new { enctype="multipart/form-data" }))
  {
      @Html.ValidationSummary(true);
      &lt;div&gt;
          @(InputExtensions.Hidden(Html, "submittingUserId", ViewBag.CurrentUser))
          @(InputExtensions.Hidden(Html, "signalConnectionId"))
          &lt;br /&gt;
          @Html.EditorFor(model =&gt; model.UploadedFile)
          @Html.ValidationMessageFor(model =&gt; model.UploadedFile)
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input id="subButton" type="submit" value="UploadFile" title="Upload File" /&gt;
      &lt;/div&gt;
  }
  
  @section Scripts {
      @Scripts.Render("~/Scripts/jquery.signalR-1.1.1.min.js")
      @Scripts.Render("~/Hubs")
  
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              var accountMovementMoveHub = $.connection.accountMovementHub;
              $("#signalConnectionId").val($.connection.connectionId);
  
              $.connection.hub.updateProgress = function (message) {
                  $("#progress-list").append('&lt;li&gt;' + message + '&lt;/li&gt;');
  
              };
  
              $.connection.hub.start();
          });
      &lt;/script&gt;
  
  }
  </code></pre>
  
  <p>I've also added these elements to the web.config:</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;/modules&gt;
  &lt;/system.webServer&gt;  
  </code></pre>
  
  <p>It's been driving me absolutely insane, I've tried absolutely every suggestion I could find on here, github, and anywhere else for that matter :(</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>Thanks</p>
  
  <p><strong>ANSWER</strong></p>
  
  <p>So it turns out, I assumed that the script reference to /signalr/hubs was to the PHYSICAL folder containing the hubs. Which it isn't; it is a reference to a virtual directory, which is why if you ALSO have a physical folder called SignalR it gets confused. I moved my hubs folder to my business project, and set the script reference back to "/signalr/hubs" and it all started working.</p>
  
  <p>Sorry about the stupid question and thanks for your answers.</p>