Browse Source

fix: 调整模板

9.3.4.8 9.3.4.5
HanPaoPao 5 months ago
parent
commit
682ded3eec
  1. 2
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs
  2. 9
      templates/pro-nuget/service/host/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs

2
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Pages/Login.cshtml.cs

@ -57,7 +57,7 @@ namespace Lion.AbpPro.Pages
var result = await _accountAppService.LoginAsync(new LoginInput()
{ Name = userName, Password = password });
Response.Cookies.Append(AbpProHttpApiHostConst.DefaultCookieName,
Response.Cookies.Append(AbpProAspNetCoreConsts.DefaultCookieName,
result.Token, options);
}
catch (Exception e)

9
templates/pro-nuget/service/host/MyCompanyName.MyProjectName.HttpApi.Host/Program.cs

@ -1,6 +1,8 @@
namespace MyCompanyName.MyProjectName
{
namespace MyCompanyName.MyProjectName;
public class Program
{
public static async Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
@ -9,6 +11,7 @@ namespace MyCompanyName.MyProjectName
try
{
Log.Information("MyCompanyName.MyProjectName.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host
.AddAppSettingsSecretsJson()
@ -19,6 +22,8 @@ namespace MyCompanyName.MyProjectName
loggerConfiguration,
context.Configuration);
});
// 设置MaxRequestBodySize
//builder.WebHost.ConfigureKestrel(options => options.Limits.MaxRequestBodySize = 52428800);
await builder.AddApplicationAsync<MyProjectNameHttpApiHostModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();

Loading…
Cancel
Save