Quote:
When the ashx file is called, a generated file will save into a desired local folder.
Your ASHX code is running
on the server. You are trying to save the file to a folder
on the server. It's quite likely that the folder either doesn't exist, or your application doesn't have permission to write to it.
If you want the file to be saved on the user's computer, you need to send the file in the response with the appropriate headers.
Downloading a File with a Save As Dialog in ASP.NET - Rick Strahl's Web Log[
^]
NB: Before you ask, no, you cannot force the user to save the file in a particular folder, or with a particular name. You cannot even force them to save it; they could chose to open it instead, or to abort the download.