ASP.Net MVC store within Resource or as Content
I have a very huge amoun开发者_Go百科t of images (about 20K) that I don't want to be directly accessible by a user. Therefore I have a controller that streams a requested images back if the requesttoken is valid. I wonder now if I should store the images within a internal Resourcefile or just as content? I tried content before but you are able to access them from the browser if you know the folder and filename. The files don't change at runtime.
Thanks in advance for any hint on this!
You should use the App_Data
folder for this. This folder is hidden from the outside so it is ideal for storing embedded databases or files as you want.
You may be interested in:
What is the App_Data folder used for in Visual Studio?
精彩评论