27 lines
954 B
C#
27 lines
954 B
C#
![]() |
using Autofac.Extensions.DependencyInjection;
|
||
|
using Microsoft.AspNetCore.Hosting;
|
||
|
|
||
|
namespace YD_WeChatApplet
|
||
|
{
|
||
|
public class Program
|
||
|
{
|
||
|
public static void Main(string[] args)
|
||
|
{
|
||
|
var host = CreateHostBuilder(args).Build();
|
||
|
host.Run();
|
||
|
}
|
||
|
|
||
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||
|
Host.CreateDefaultBuilder(args)
|
||
|
.ConfigureWebHostDefaults(webBuilder =>
|
||
|
{
|
||
|
webBuilder.ConfigureKestrel(serverOptions =>
|
||
|
{
|
||
|
serverOptions.Limits.MaxRequestBodySize = 10485760;
|
||
|
});
|
||
|
webBuilder.UseKestrel().UseUrls("http://*:9993");
|
||
|
webBuilder.UseIIS();
|
||
|
webBuilder.UseStartup<Startup>();
|
||
|
}).UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
||
|
}
|
||
|
}
|