tcc/ASP.NET/Program.cs

29 lines
666 B
C#
Raw Normal View History

2023-08-20 20:21:58 +00:00
using Microsoft.AspNetCore.Server.Kestrel.Core;
2023-08-16 18:58:01 +00:00
using TCC.Services;
namespace TCC
2023-08-16 18:40:27 +00:00
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
2023-08-16 18:58:01 +00:00
builder.Services.AddScoped<ImageService>();
2023-08-16 18:40:27 +00:00
builder.Services.AddControllers();
2023-08-20 20:21:58 +00:00
builder.Services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = int.MaxValue; // if don't set default value is: 30 MB
});
2023-08-16 18:40:27 +00:00
var app = builder.Build();
app.MapControllers();
app.Run();
}
}
}