问题
I want to deploy my C# API project in Microsoft Azure.
I've changed my wwwroot folder name to "Documents" like:
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseWebRoot("Documents")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<MyStartup>()
.Build();
host.Run();
}
I is working perfectly using POSTMAN or local server but when I'm accessing it with Microsoft Azure, It is showing error of not finding the above mentioned folder. How can I get it in Azure?
回答1:
In Azure you have to go to Application setting and edit the path according to your requirements. Picture is attached for guidance.
来源:https://stackoverflow.com/questions/54439739/how-to-use-wwwroot-folder-in-azure-thats-already-working-in-iis