添加项目文件。
This commit is contained in:
25
apihost/Tnb.API.Entry/Program.cs
Normal file
25
apihost/Tnb.API.Entry/Program.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
Serve.Run(RunOptions.Default
|
||||
.AddWebComponent<WebComponent>().WithArgs(args));
|
||||
|
||||
public class WebComponent : IWebComponent
|
||||
{
|
||||
public void Load(WebApplicationBuilder builder, ComponentContext componentContext)
|
||||
{
|
||||
//// <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD>
|
||||
//builder.Logging.AddFilter((provider, category, logLevel) =>
|
||||
//{
|
||||
// return !new[] { "Microsoft.Hosting", "Microsoft.AspNetCore" }.Any(u => category.StartsWith(u)) && logLevel >= LogLevel.Information;
|
||||
//});
|
||||
builder.Host.UseWindowsService();
|
||||
builder.WebHost.ConfigureKestrel(options =>
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD> null
|
||||
options.Limits.MaxRequestBodySize = 52428800;
|
||||
});
|
||||
|
||||
//builder.Logging.AddConsoleFormatter(options =>
|
||||
//{
|
||||
// options.DateFormat = "yyyy-MM-dd HH:mm:ss(zzz) dddd";
|
||||
//});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user