when i download a file it is showing this type of error in catch block.My code is
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(path));
Response.WriteFile(path);
Response.End();
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
how i solve this error