title: System.OutOfMemoryException: 'Exception_WasThrown'
body: <p>Follow my code:</p>
  
  <pre><code>[HttpGet]
  public ActionResult StreamVideo(int type1, int type2)
  {
      using (var ctx = new Entities())
      {
          var result = ctx.Table.Where(x =&gt; x.Type1 == type1 &amp;&amp; x.Type2 == type2).FirstOrDefault();
  
          byte[] video_byte = result.Video;
  
          return new RangeFileContentResult(video_byte, "video/x-msvideo", "NameFile.mp4", DateTime.Now);
      }
  }
  </code></pre>
  
  <p>I have a "modal bootstrap" where it has video content.When closing modal and opening again, it gives problem:</p>
  
  <blockquote>
    <p>System.OutOfMemoryException: 'Exception_WasThrown'</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/8na3y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8na3y.jpg" alt="enter image description here"></a></p>
  
  <p>Problem occurs on line: </p>
  
  <pre><code>var result = ctx.Table.Where(x =&gt; x.Type1 == type1 &amp;&amp; x.Type2 == type2).FirstOrDefault();
  </code></pre>
  
  <p>Any solution ?</p>