title: SqlDependency not working with Existing Database
body: <p>I'm using Signalr with SqlDependency. My code works and it shows me realtime results like I wanted. But the issue is it is working my newly created database. If I change the database to old one the SqlDependency stops work and not getting the change detection on my database table. </p>
  
  <p>Below is my code:</p>
  
  <pre><code>#region SignalRMethods
      [System.Web.Script.Services.ScriptMethod()]
      [System.Web.Services.WebMethod(EnableSession = true)]
      public GlobalApplicationError[] GetErrorsList()
      {
          var cs = "Data Source=.;Initial Catalog=NotifyDB;Integrated Security=True";
          using (var connection = new SqlConnection(cs))
          {
              connection.Open();
              SqlDependency.Start(cs);
              using (SqlCommand command = new SqlCommand(@"SELECT  [Form_Name],[Message],[Prepared_By_Date] FROM [GlobalApplicationError]", connection))
              {
                  // Make sure the command object does not already have
                  // a notification object associated with it.
  
                  SqlDependency dependency = new SqlDependency(command);
                  dependency.OnChange += new OnChangeEventHandler(dependency_OnChange);
  
                  if (connection.State == ConnectionState.Closed)
                      connection.Open();
  
                  using (var reader = command.ExecuteReader())
                      return reader.Cast&lt;IDataRecord&gt;()
                          .Select(x =&gt; new GlobalApplicationError()
                          {
                              Form_Name = x["Form_Name"].ToString(),
                              Message = x["Message"].ToString(),
                              Prepared_By_Date = Convert.ToDateTime(x["Prepared_By_Date"])
                          }).ToList().ToArray();
              }
          }
      }
  
      private static void dependency_OnChange(object sender, SqlNotificationEventArgs e)
      {
          MyHub.Show();
      }
      #endregion
  </code></pre>
  
  <p>Above code perfectly works on database <code>NotifyDB</code> but not on my existing one which is <code>eprocure</code> if I change the database in my connection string. As I'm using the asmx web service so I always update the reference of my web service. Plus I've enable_broker set to true on both databases.</p>
  
  <p>Database screen shots:</p>
  
  <p><code>NotifyDB</code></p>
  
  <p><a href="https://i.stack.imgur.com/sf15l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sf15l.png" alt="enter image description here"></a></p>
  
  <p><code>eprocure</code></p>
  
  <p><a href="https://i.stack.imgur.com/uBxla.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uBxla.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/HfqXb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HfqXb.png" alt="enter image description here"></a></p>
  
  <p><strong>output</strong></p>
  
  <p><a href="https://i.stack.imgur.com/euRTm.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/euRTm.gif" alt="enter image description here"></a></p>
  
  <p>Kindly let me know what I'm doing wrong in my code. Thanks in advance.</p>