ASP.Net Baixar arquivo no navegador do cliente

Estou escrevendo uma página de teste simples para baixar um arquivo de texto em um navegador, clicando no botão. Estou recebendo um erro realmente estranho que nunca vi antes. Alguma ideia

O erro ocorre em 'Response.End ();' e o arquivo nunca chega ao navegador do cliente

Código

  string filePath = "C:\\test.txt";
  FileInfo file = new FileInfo(filePath);
  if (file.Exists)
  {
    Response.ClearContent();
    Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
    Response.AddHeader("Content-Length", file.Length.ToString());
    Response.ContentType = "text/plain";
    Response.TransmitFile(file.FullName);
    Response.End();
  }

Erro

ão é possível avaliar a expressão porque o código está otimizado ou um quadro nativo está no topo da pilha de chamada

questionAnswers(4)

yourAnswerToTheQuestion