can any one tell me whether it is a good practice to store IIS Virtual directory .
in aspnet mvc , we are mainitaing log files ,
1)can we store them in virtual directry of that web application 2) we have an option to download pdf files from my website , is that a good practice to store them in some location in virtual directory.
please clarify
CodePudding user response:
It depends on your requirements, but there is generally nothing wrong with storing log files and other app data within your app's virtual directory. There are indeed benefits to doing so, such as self-containment. It is common to create a Logs folder within the directory if your app generates logs as text files.
As for data files that need to be accessible/downloadable from your app, in ASP.NET (not Core) you can store them within your project's App_Data
folder, which is made for this and is secured from the Web by default. In ASP.NET Core, you'll need to create your own folder and ensure it is secured appropriately. More info on the latter here: App_Data directory in ASP.NET5 MVC6