title: sql dependency Issue - Notification occurs more than one time
body: <p>At first I was not using sessions, so every time I refresh this page. notification occurs 1 more time than last time. So I used this (Sessions) technique which helped but now there is one problem, i.e when I left the page for some time (or when the session is expired without clicking on log out button). I login to the application and there it is, it will then create every notification twice. </p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {               
                     if (IsPostBack)
                          return;
  
  
                      User _userOnLine = Session["CUser"] as User;
  
                      if (_userOnLine == null)
                      {
                          SqlDependency.Stop(@"XXXXXXXXXXXX");
                          Session.RemoveAll();
                          Response.Redirect(@"~\Login.aspx");  
                      }
  
                      if (Session["count"] == null)
                      {
                          SqlDependency.Start(@"XXXXXX");
                          SendNotification();
                      }
  
                      Session["count"] = 1;
  
   }
  </code></pre>
  
  <p><strong>Any Suggestions??</strong></p>