Is appsettings.json protected by IIS?

In older ASP.NET applications , you cannot upload *.configfiles by going to the URL. But the new agreement is to use . Now, if I have an ASP.NET Core website called , and it is served by IIS from a directory with a name , and there is a file located in ... Is IIS smart enough not to serve this file via HTTP, if anyone will go to https://contoso.com/appsettings.json ?appsettings.jsoncontoso.comC:\inetpub\websites\contoso.comC:\inetpub\websites\contoso.com\appsettings.json

+4
source share
1 answer

Files are usually filed from the wwwroot folder. The appsettings.json file is safe until you configure it C:\inetpub\websites\contoso.com\as your root application website. By default, static files are in C:\inetpub\websites\contoso.com\wwwroot\. I recommend this excellent document: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files

, , IIS . ASP.NET Core, , "wwwroot". - ASP.NET Core IIS -, IIS ASP.NET. , ASP.NET Core. , , Microsoft.AspNetCore.StaticFiles.

+5

Source: https://habr.com/ru/post/1674792/


All Articles