title: Signal R Chat application on IIS not working
body: <p>I am trying to build a SignalR application in Visual Studio 2012. My problem is that it works well under Visual Studio debug (using Visual Studio 2012 on Windows 7), but when I try to deploy the application on IIS 7.5 , the app does nothing more than displaying the index.html page. </p>
  
  <p>my Index.html page is like :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  
      &lt;link type="text/css" rel="stylesheet" href="Css/ChatStyle.css" /&gt;
      &lt;link rel="stylesheet" href="/Css/JQueryUI/themes/base/jquery.ui.all.css"&gt;
  
  
  
  
  
      &lt;!--Script references. --&gt;
  
        &lt;!--Reference the jQuery library. --&gt;
      &lt;script src="/Scripts/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
  
      &lt;script src="/Scripts/ui/jquery.ui.core.js"&gt;&lt;/script&gt;
      &lt;script src="/Scripts/ui/jquery.ui.widget.js"&gt;&lt;/script&gt;
      &lt;script src="/Scripts/ui/jquery.ui.mouse.js"&gt;&lt;/script&gt;
      &lt;script src="/Scripts/ui/jquery.ui.draggable.js"&gt;&lt;/script&gt;
      &lt;script src="/Scripts/ui/jquery.ui.resizable.js"&gt;&lt;/script&gt;
  
  
  
      &lt;!--Reference the SignalR library. --&gt;
      &lt;script src="/Scripts/jquery.signalR-1.0.0.js"&gt;&lt;/script&gt;
  
      &lt;!--Reference the autogenerated SignalR hub script. --&gt;
      &lt;script src="/signalr/hubs"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
  
          $(function () {
  
              setScreen(false);
  
              // Declare a proxy to reference the hub. 
              var chatHub = $.connection.chatHub;
  
              registerClientMethods(chatHub);
  
              // Start Hub
              $.connection.hub.start().done(function () {
  
                  registerEvents(chatHub)
  
              });
  
          });
  
          function setScreen(isLogin) {
  
              if (!isLogin) {
  
                  $("#divChat").hide();
                  $("#divLogin").show();
              }
              else {
  
                  $("#divChat").show();
                  $("#divLogin").hide();
              }
  
          }
  
          function registerEvents(chatHub) {
  
              $("#btnStartChat").click(function () {
  
                  var name = $("#txtNickName").val();
                  if (name.length &gt; 0) {
                      chatHub.server.connect(name);
                  }
                  else {
                      alert("Please enter name");
                  }
  
              });
  
  
              $('#btnSendMsg').click(function () {
  
                  var msg = $("#txtMessage").val();
                  if (msg.length &gt; 0) {
  
                      var userName = $('#hdUserName').val();
                      chatHub.server.sendMessageToAll(userName, msg);
                      $("#txtMessage").val('');
                  }
              });
  
  
              $("#txtNickName").keypress(function (e) {
                  if (e.which == 13) {
                      $("#btnStartChat").click();
                  }
              });
  
              $("#txtMessage").keypress(function (e) {
                  if (e.which == 13) {
                      $('#btnSendMsg').click();
                  }
              });
  
  
          }
  
          function registerClientMethods(chatHub) {
  
              // Calls when user successfully logged in
              chatHub.client.onConnected = function (id, userName, allUsers, messages) {
  
                  setScreen(true);
  
                  $('#hdId').val(id);
                  $('#hdUserName').val(userName);
                  $('#spanUser').html(userName);
  
                  // Add All Users
                  for (i = 0; i &lt; allUsers.length; i++) {
  
                      AddUser(chatHub, allUsers[i].ConnectionId, allUsers[i].UserName);
                  }
  
                  // Add Existing Messages
                  for (i = 0; i &lt; messages.length; i++) {
  
                      AddMessage(messages[i].UserName, messages[i].Message);
                  }
  
  
              }
  
              // On New User Connected
              chatHub.client.onNewUserConnected = function (id, name) {
  
                  AddUser(chatHub, id, name);
              }
  
  
              // On User Disconnected
              chatHub.client.onUserDisconnected = function (id, userName) {
  
                  $('#' + id).remove();
  
                  var ctrId = 'private_' + id;
                  $('#' + ctrId).remove();
  
  
                  var disc = $('&lt;div class="disconnect"&gt;"' + userName + '" logged off.&lt;/div&gt;');
  
                  $(disc).hide();
                  $('#divusers').prepend(disc);
                  $(disc).fadeIn(200).delay(2000).fadeOut(200);
  
              }
  
              chatHub.client.messageReceived = function (userName, message) {
  
                  AddMessage(userName, message);
              }
  
  
              chatHub.client.sendPrivateMessage = function (windowId, fromUserName, message) {
  
                  var ctrId = 'private_' + windowId;
  
  
                  if ($('#' + ctrId).length == 0) {
  
                      createPrivateChatWindow(chatHub, windowId, ctrId, fromUserName);
  
                  }
  
                  $('#' + ctrId).find('#divMessage').append('&lt;div class="message"&gt;&lt;span class="userName"&gt;' + fromUserName + '&lt;/span&gt;: ' + message + '&lt;/div&gt;');
  
                  // set scrollbar
                  var height = $('#' + ctrId).find('#divMessage')[0].scrollHeight;
                  $('#' + ctrId).find('#divMessage').scrollTop(height);
  
              }
  
          }
  
          function AddUser(chatHub, id, name) {
  
              var userId = $('#hdId').val();
  
              var code = "";
  
              if (userId == id) {
  
                  code = $('&lt;div class="loginUser"&gt;' + name + "&lt;/div&gt;");
  
              }
              else {
  
                  code = $('&lt;a id="' + id + '" class="user" &gt;' + name + '&lt;a&gt;');
  
                  $(code).dblclick(function () {
  
                      var id = $(this).attr('id');
  
                      if (userId != id)
                          OpenPrivateChatWindow(chatHub, id, name);
  
                  });
              }
  
              $("#divusers").append(code);
  
          }
  
          function AddMessage(userName, message) {
              $('#divChatWindow').append('&lt;div class="message"&gt;&lt;span class="userName"&gt;' + userName + '&lt;/span&gt;: ' + message + '&lt;/div&gt;');
  
              var height = $('#divChatWindow')[0].scrollHeight;
              $('#divChatWindow').scrollTop(height);
          }
  
          function OpenPrivateChatWindow(chatHub, id, userName) {
  
              var ctrId = 'private_' + id;
  
              if ($('#' + ctrId).length &gt; 0) return;
  
              createPrivateChatWindow(chatHub, id, ctrId, userName);
  
          }
  
          function createPrivateChatWindow(chatHub, userId, ctrId, userName) {
  
              var div = '&lt;div id="' + ctrId + '" class="ui-widget-content draggable" rel="0"&gt;' +
                         '&lt;div class="header"&gt;' +
                            '&lt;div  style="float:right;"&gt;' +
                                '&lt;img id="imgDelete"  style="cursor:pointer;" src="/Images/delete.png"/&gt;' +
                             '&lt;/div&gt;' +
  
                             '&lt;span class="selText" rel="0"&gt;' + userName + '&lt;/span&gt;' +
                         '&lt;/div&gt;' +
                         '&lt;div id="divMessage" class="messageArea"&gt;' +
  
                         '&lt;/div&gt;' +
                         '&lt;div class="buttonBar"&gt;' +
                            '&lt;input id="txtPrivateMessage" class="msgText" type="text"   /&gt;' +
                            '&lt;input id="btnSendMessage" class="submitButton button" type="button" value="Send"   /&gt;' +
                         '&lt;/div&gt;' +
                      '&lt;/div&gt;';
  
              var $div = $(div);
  
              // DELETE BUTTON IMAGE
              $div.find('#imgDelete').click(function () {
                  $('#' + ctrId).remove();
              });
  
              // Send Button event
              $div.find("#btnSendMessage").click(function () {
  
                  $textBox = $div.find("#txtPrivateMessage");
                  var msg = $textBox.val();
                  if (msg.length &gt; 0) {
  
                      chatHub.server.sendPrivateMessage(userId, msg);
                      $textBox.val('');
                  }
              });
  
              // Text Box event
              $div.find("#txtPrivateMessage").keypress(function (e) {
                  if (e.which == 13) {
                      $div.find("#btnSendMessage").click();
                  }
              });
  
              AddDivToContainer($div);
  
          }
  
          function AddDivToContainer($div) {
              $('#divContainer').prepend($div);
  
              $div.draggable({
  
                  handle: ".header",
                  stop: function () {
  
                  }
              });
  
              ////$div.resizable({
              ////    stop: function () {
  
              ////    }
              ////});
  
          }
  
      &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="header"&gt;
          ABC BANK CHAT ROOM
      &lt;/div&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
  
      &lt;div id="divContainer"&gt;
          &lt;div id="divLogin" class="login"&gt;
              &lt;div&gt;
                  Your Name:&lt;br /&gt;
              &lt;input id="txtNickName" type="text" class="textBox" /&gt;
              &lt;/div&gt;
              &lt;div id="divButton"&gt;
                  &lt;input id="btnStartChat" type="button" class="submitButton" value="Start Chat" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div id="divChat" class="chatRoom"&gt;
              &lt;div class="title"&gt;
                  Welcome to Chat Room [&lt;span id='spanUser'&gt;&lt;/span&gt;]
  
              &lt;/div&gt;
              &lt;div class="content"&gt;
                  &lt;div id="divChatWindow" class="chatWindow"&gt;
                  &lt;/div&gt;
                  &lt;div id="divusers" class="users"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="messageBar"&gt;
                  &lt;input class="textbox" type="text" id="txtMessage" /&gt;
                  &lt;input id="btnSendMsg" type="button" value="Send" class="submitButton" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;input id="hdId" type="hidden" /&gt;
          &lt;input id="hdUserName" type="hidden" /&gt;
      &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have tried some of the methods listed here: Signalr/Hub not loading in IIS 7 but working correctly in Visual Studio, but none of them seem to work.  Any help would be greatly appreciated. Thanks, chiranjit</p>