How to use “wwwroot” folder in azure that's already working in IIS

依然范特西╮ 提交于 2020-01-25 12:52:38

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!