I am new at asp.net core application. I have a settings.josn
file in data
folder. That contains some configurations for my applicaiton. But the users should not get this file via http request ( http://10.1.15/data/settings.json
). How can I protect id. The asp.net framework applications are using app_data folder. Can I use this folder in core applciations?
By default, in Asp.Net Core
all static files are not available for public access.
If your file is accessible then just remove the code that makes it accessible . Typically, such code is in Startup
class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.