Hello @Customer21753,
Example of how to programmatically obtain path to \private folder in .NET / ASP.NET Core:
var builder = WebApplication.CreateBuilder(args);
Console.WriteLine("Content root: " + builder.Environment.ContentRootPath);
Console.WriteLine("Web root: " + builder.Environment.WebRootPath);
var app = builder.Build();
// private path folder outside wwwroot
var privateFolderPath = Path.Combine(builder.Environment.ContentRootPath, "..", "Private");
Console.WriteLine("Private folder path: " + privateFolderPath);
In this example \private folder is outside of wwwroot, so it cannot be accessed through HTTP requests.