Your question, your audience. Choose who sees your identity—and your question—with question security.
If I run in Visual studio the command works and the file is downloaded. If I run on the server I get this error
return File(path, "application/msexcel",trimmedPath);
If I copy that path into explorer it opens on the server
Could not find a part of the path 'r:\results\19262\19262-BA-T1\19262-BA-T1-19262-BA-T1-2_12_11_2014_32C_CST_8870.xlsx'.