프로그래밍/AspNetCore 6.0

using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Hosting; var app = WebApplication.CreateBuilder(new WebApplicationOptions { EnvironmentName = Environments.Development }).Build(); app.UseStatusCodePages(); app.MapGet("/", () => { return Results.Text(@" Sample for {int}, {min()}, {max()}, and {range(min, max))} route constraints /{id:int} /10 /{id:in..
using Microsoft.AspNetCore.Builder; var app = WebApplication.Create(); app.UseFileServer(); await app.RunAsync(); * default.htm * default.html * index.htm * index.html at `wwwroot` Index.html Test.html 전송가능해짐.
using Microsoft.AspNetCore.Builder; WebApplication app = WebApplication.Create(); app.UseWelcomePage(); app.Run();
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; const string Page = @""; var builder = WebApplication.CreateBuilder(new WebApplicationOptions { WebRootPath = "wwwroot2" }); var app = builder.Build(); app.UseStaticFiles(); app.MapGet("/", () => Results.Text(Page, "text/html")); app.Run(); //폴더변경 WebRootPath = "wwwroot2" // 정적폴더 wwwroot2 에서 실행되도록.. app.UseStaticFiles(); // 파일실..
에그티비
'프로그래밍/AspNetCore 6.0' 카테고리의 글 목록