title: SignalR Not Working with asp.net and sql server 2014
body: <h1>SignalR With Asp.net MVC</h1>
  <p>Im trying since form 10 days but fail to solve my SignalR Issue.
  Simply i want to show some data  using signalR,Here is my code
  **</p>
  <pre><code>public List&lt;User&gt; Get()
          {
              List&lt;User&gt; user = new List&lt;User&gt;();
              using (SqlConnection conn = new SqlConnection(conString))
              {
                  string query = @&quot;SELECT [Name],[Address] FROM [dbo].[UserTable]&quot;;
                  SqlCommand comm = new SqlCommand(query, conn);
                  conn.Open();
                  comm.Notification = null;
                  SqlDependency dep = new SqlDependency(comm);
                  dep.OnChange += Dep_OnChange;
                  using (SqlDataReader reader = comm.ExecuteReader())
                  {
                      while (reader.Read())
                      {
                          User users = new User();
                          users.Name = reader[0].ToString();
                          users.Address = reader[1].ToString();
                          user.Add(users);
                      }
                  }
              }
              return user;
  private void Dep_OnChange(object sender, SqlNotificationEventArgs e)
          {
              if (e.Type == SqlNotificationType.Change)
              {
                  MyHub hub = new MyHub();
                  hub.Send();
              }
  
          }
  </code></pre>
  <p>**
  Controller Code:</p>
  <pre><code> public JsonResult GetAll()
          {
              NotificationComponent dc = new NotificationComponent();
              var list = dc.Get();
              return new JsonResult { Data=list,JsonRequestBehavior=JsonRequestBehavior.AllowGet};
          }
  </code></pre>
  <p>this returning a list of users but not Asynchronously (as expected).</p>
  <p>My js Code is here.</p>
  <pre><code>&lt;script&gt;
          function getAll() {
              $.ajax({
                  type: 'GET',
                  url: '/Home/GetAll',
                  success: function (data) {
                      for (var i = 0; i &lt; data.length; i++) {
                          $('#get').append(&quot;&lt;li&gt;Name: &quot; + data[i].Name + &quot;Address: &quot; + data[i].Address + &quot;&lt;/li&gt;&quot;);
                      }
                  }
              })
          }
  
              $.connection.hub.start()
                  .done(function () {
                      console.log(&quot;Hub Connected...&quot;);
                     
              })
         getAll();
              $.connection.myHub.client.notify = function () {
                  getAll();
              }
  
      &lt;/script&gt;
  </code></pre>
  <p>Sql Queries</p>
  <pre><code>GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [NT AUTHORITY\NETWORK SERVICE]
  GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [NT AUTHORITY\IUSR]
  GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [JANBAZ\JANBAZ KHAN]
  ALTER DATABASE [SignalRDb] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
  </code></pre>
  <p>this all i have done ,i think the query is problem,please help me
  Thanks in advance
  (VS 2017,IIS Version 10,Sql server2014,win 10)</p>