title: Generic handler not returning values
body: <p>Handler is not returning image. If I remove conditional statement, handler is returning image. This is my code </p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
      {
          string sid = "JUN15MBACHN001";
          SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
          connection.Open();
          SqlCommand command = new SqlCommand("select suppassportphoto from studdetails where sregno=" + sid, connection);
          SqlDataReader dr = command.ExecuteReader();
          dr.Read();
          Byte[] br = (Byte[])dr[0];
          if (br.Length &gt; 1)
          {
              context.Response.BinaryWrite((Byte[])dr[0]);
          }          
          else
          {
              string path = context.Server.MapPath("~/image/emptymalepic.jpg");
              byte[] byteArray = File.ReadAllBytes(path);
              context.Response.BinaryWrite(byteArray);
          }
          connection.Close();
          context.Response.End();
      }
  
      public bool IsReusable
      {
          get
          {
              return false;
          }
      }
  </code></pre>
  
  <p>I don't know where I'm going wrong ? Any help would be appreciated.</p>