Add project files.
This commit is contained in:
41
SysApp/Program.cs
Normal file
41
SysApp/Program.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using AppLibs.Libs;
|
||||
|
||||
WSNavigation.LoadJson();
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
#if (!DEBUG)
|
||||
builder.WebHost.UseKestrel(o =>
|
||||
{
|
||||
o.ListenAnyIP(5103, lo =>
|
||||
{
|
||||
lo.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
|
||||
lo.UseHttps(CertificateStore.GetHTTPSCertificate("MApp.pfx"), "Pgq95b7r");
|
||||
});
|
||||
});
|
||||
builder.Services.AddControllersWithViews();
|
||||
#else
|
||||
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
|
||||
#endif
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.Run();
|
Reference in New Issue
Block a user