📜  net.core “只能使用 iapplicationbuilder.usepathbase() 配置路径库” - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:22.195000             🧑  作者: Mango

代码示例1
// Cannot set path base via applicationUrl, must set it here using UsePathBase()

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UsePathBase("/{my application name}");
            app.Run(context =>
            {
                return context.Response.WriteAsync("Hello World!");
            });
        }