title: Error: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
body: <p>I am getting the following exception in c#: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack</p>
  
  <p>When calling ReadToEnd() method from a streamreader in a web application.</p>
  
  <p>If i copy and paste the same code in a console application. It works.</p>
  
  <p>Any ideas</p>
  
  <p>Cheers</p>