ser*_*0ne 4 c# static-files asp.net-core
我正在关注此文档,但我遇到了困难:https: //docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files
考虑我的目录结构:
wwwroot
    dist
        index.html
在我的启动课上,我有:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }
    app.UseDefaultFiles();
    app.UseStaticFiles();
    app.UseStaticFiles(new StaticFileOptions
    {
        FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "dist"))
    });
}
当我启动应用程序时,我没有看到我的index.html页面,但是如果我导航到,我会这样做 <host>/dist/index.html
如何配置它以便ASP.NET自动将我带到该页面<host>?
| 归档时间: | 
 | 
| 查看次数: | 8379 次 | 
| 最近记录: |