I have some code that gets the exception Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. I have pasted some code below. I have confirmed that I am in mixed mode debugging, (native and managed). I have also confirmed that I am not 'pre-compiline' b4 debugging. the code is for a 'csv' download. Can someone help?
//set the conttent type of the file to be downloaded (IF NEEDED)
Response.ContentType = "application/vnd.ms-excel";
// initialize the http content-disposition header to indicate a file attachment with the filename
Response.AppendHeader("Content-Disposition", "Attachment; Filename=\"" + strFileNameCSV + "\"");
//// transfer the file byte-by-byte to the response object
FileInfo fileToDownload = new FileInfo(strFileNameCSV);
View Complete Post