Your code is running on the server
. If you save the file in a specific path, it will be saved on the server
. The user will not be able to access it.
If you want the user to open the file, you will need to send it via the response. You cannot control where, or even if
, the user saves the file on their computer.
If you want the user to upload their changes back to the server, then you have to use an
, and the user will have to select the updated file from their computer.
Saving and opening the file on the server might appear
to work when you're debugging your site in Visual Studio. But that's only because, in that specific case, the server and the client are the same computer. As soon as you deploy your code to a real server, it will stop working. You'll either get an exception telling you that Office is not installed on the server, or the file will open on the server, where nobody will ever see it.
And if you were thinking of using Office Interop from your code, then you need to read this:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.