title: chat.client in undefined in SignalR
body: <p>I have followed this <a href="http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc" rel="nofollow noreferrer">SignalR Tutorial</a></p>
  
  <p>But I am getting <code>chat.client</code> is undefined. </p>
  
  <p>This is my ChatHub.cs code.</p>
  
  <pre><code>  [HubName("ChatHub")] 
      public class ChatHub : Hub
      {
          public void Send(string name, string message)
          {
              Clients.All.addNewMessageToPage(name, message);
          }
      }
  </code></pre>
  
  <p>and my startupclass.cs</p>
  
  <pre><code>[assembly: OwinStartup(typeof(SignalRChat.Startup))]
  namespace SignalRChat
  {
      public class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              app.MapSignalR();
  
          }
      }
  }
  </code></pre>
  
  <p>and in my chat view</p>
  
  <pre><code>@section scripts {
      &lt;script src="~/Scripts/jquery.signalR-2.2.0.min.js"&gt;&lt;/script&gt;
      &lt;script src="~/signalr/hubs"&gt;&lt;/script&gt;
      &lt;script&gt;
          $(function () {
              var chat = $.connection.ChatHub;
              chat.client.addNewMessageToPage = function (name, message) {
                  $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + htmlEncode(name)
                      + '&lt;/strong&gt;: ' + htmlEncode(message) + '&lt;/li&gt;');
              };
              $('#displayname').val(prompt('Enter your name:', ''));
              $('#message').focus();
              $.connection.hub.start().done(function () {
                  $('#sendmessage').click(function () {
                      chat.server.send($('#displayname').val(), $('#message').val());
                      $('#message').val('').focus();
                  });
              });
          });
          function htmlEncode(value) {
              var encodedValue = $('&lt;div /&gt;').text(value).html();
              return encodedValue;
          }
      &lt;/script&gt;
  }
  </code></pre>
  
  <p>I found similar question on stackoverflow, but unable to solve my problem.</p>
  
  <p><a href="https://stackoverflow.com/questions/23268351/unable-to-get-property-client-of-undefined-in-signalr">Solution 1</a></p>
  
  <p>I have deleted temporary files from the root folder in the following path. but this didn't solve my problem. </p>
  
  <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
  </code></pre>