How can I get file from url directly?

Mark Oriend asked on November 11, 2018 07:48

Using Scheduled Task, I stored some data from Netsuite into csv file.
The csv file is stored into the path Website\CMS\App_Data directory.
But I can't access that file from url directly.
If that csv file name is test.csv, then I want to access that file using url like http://localhost:51872/XXXX/test.csv
In this case, how can I access that file like that ?
Thanks.

Correct Answer

Peter Mogilnitski answered on November 12, 2018 04:58

The App_Data folder is a special folder reserved for data such as database files and so on, and will NOT render out any contents on the web. This is by design, and intentional and cannot be changed. You can either store is in a different directory or use page with a web part to read it output the content. I guess a folder with a different name would be the easiest solution.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.