Last post Aug 30, 2017 03:29 AM by Deepak Panchal
Aug 29, 2017 10:13 AM|dow7|LINK
How to prevent users from downloading .sql files or viewing them?
I have some .sql files inside a folder (not App_Data) and i do not want to allow public users to download or view them.
Aug 29, 2017 10:50 AM|mgebhard|LINK
Files within the App_Data folder are not severed.
The content of application folders, except for the App_Themes folder, is not served in response to Web requests, but it can be accessed from application code.
Aug 29, 2017 10:53 AM|PatriceSc|LINK
IIS shouldn't allow to serve files that are not explicitely allowed (ie no mime type registered for them).
You can also block some files using a web.config file (as done with the MVC Views folders)
You could also move those files outside of a reachable folder etc...
Try to apply all the possible options you can rather than to rely on a single blocking point.
Aug 30, 2017 03:29 AM|Deepak Panchal|LINK
as other community members had already suggested that it will not allow someone who try to download the files resides in this folder.
It is a feature for a security purpose of the data.
so if some one try to web request then it will not allow access to it but your code can access it and use the data.