update publish profiles

This commit is contained in:
Samuele Locatelli
2021-10-21 17:47:58 +02:00
parent 707f89e88d
commit c092b1adbd
13 changed files with 173 additions and 80 deletions
+31 -20
View File
@@ -1,26 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml</DocumentationFile>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\W2019-IIS-DEV.pubxml.user" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<None Include="Properties\PublishProfiles\W2019-IIS-DEV.pubxml.user" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.11" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LiMan.DB\LiMan.DB.csproj" />
<ProjectReference Include="..\LiMan.GLS\LiMan.GLS.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LiMan.DB\LiMan.DB.csproj" />
<ProjectReference Include="..\LiMan.GLS\LiMan.GLS.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="LiMan.APi.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\.placeholder.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+46
View File
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="myvar" value="myvalue" />
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
<!--
add your targets here
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
-->
<!--
Write events to a file with the date in the filename.
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}" />
-->
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true}| ${message}" />
</targets>
<rules>
<!-- add your logging rules here -->
<!--
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" />
-->
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
<logger name="*" minlevel="Info" writeTo="fileTarget" />
</rules>
</nlog>
+19 -5
View File
@@ -11,16 +11,30 @@ namespace LiMan.Serv
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
#region Protected Fields
// https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5
// https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/
protected static NLog.Logger logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
#endregion Protected Fields
#region Public Methods
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
logger.Info("LiMan.API HostBuilder Done");
});
public static void Main(string[] args)
{
logger.Info("LiMan.API Application Starting Up");
CreateHostBuilder(args).Build().Run();
}
#endregion Public Methods
}
}
}
@@ -4,25 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/ELM.API</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>False</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/ELM.API</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAA7RC2yFYQ+sbph7Gm3hrEMAAAAAASAAACgAAAAEAAAAFhL9j1HkRjMaqEESfncpZcYAAAAIMz57CMDX9ZLAPLwms1/yHQTf/r/v74FFAAAAB6WaNF8er6HZmelU4da+AsQFSC5</EncryptedPassword>
<History>True|2021-10-21T06:48:23.1235907Z;True|2021-10-21T08:48:18.3291685+02:00;True|2021-10-15T11:33:23.1161895+02:00;True|2021-10-15T11:26:37.7646366+02:00;True|2021-10-15T11:26:08.9411561+02:00;True|2021-10-15T11:25:36.6377010+02:00;True|2021-10-15T11:25:15.7375383+02:00;True|2021-10-15T11:20:26.4607123+02:00;True|2021-10-15T11:13:33.8524245+02:00;False|2021-10-15T10:30:42.4253422+02:00;False|2021-10-15T10:27:43.8339493+02:00;False|2021-10-15T10:23:05.0864739+02:00;False|2021-10-15T10:22:43.2958457+02:00;False|2021-10-15T10:22:15.0954116+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
<History>True|2021-10-21T15:47:07.5800856Z;True|2021-10-21T17:45:53.9877689+02:00;True|2021-10-21T17:45:26.3424924+02:00;True|2021-10-21T17:44:04.8901686+02:00;True|2021-10-21T17:12:38.0143120+02:00;True|2021-10-21T12:48:27.8969428+02:00;True|2021-10-21T12:45:17.7896250+02:00;True|2021-10-21T12:44:18.8941191+02:00;True|2021-10-21T08:48:23.1235907+02:00;True|2021-10-21T08:48:18.3291685+02:00;True|2021-10-15T11:33:23.1161895+02:00;True|2021-10-15T11:26:37.7646366+02:00;True|2021-10-15T11:26:08.9411561+02:00;True|2021-10-15T11:25:36.6377010+02:00;True|2021-10-15T11:25:15.7375383+02:00;True|2021-10-15T11:20:26.4607123+02:00;True|2021-10-15T11:13:33.8524245+02:00;False|2021-10-15T10:30:42.4253422+02:00;False|2021-10-15T10:27:43.8339493+02:00;False|2021-10-15T10:23:05.0864739+02:00;False|2021-10-15T10:22:43.2958457+02:00;False|2021-10-15T10:22:15.0954116+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
</PropertyGroup>
</Project>
@@ -4,25 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/ELM.API</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>False</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/ELM.API</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAA7RC2yFYQ+sbph7Gm3hrEMAAAAAASAAACgAAAAEAAAAFhL9j1HkRjMaqEESfncpZcYAAAAIMz57CMDX9ZLAPLwms1/yHQTf/r/v74FFAAAAB6WaNF8er6HZmelU4da+AsQFSC5</EncryptedPassword>
<History>True|2021-10-21T06:48:42.2014540Z;True|2021-10-21T08:48:38.0576948+02:00;True|2021-10-21T08:48:31.5097766+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
<History>True|2021-10-21T15:10:41.5356616Z;True|2021-10-21T17:09:53.6684540+02:00;True|2021-10-21T12:51:53.0071793+02:00;True|2021-10-21T12:50:27.0123409+02:00;True|2021-10-21T08:48:42.2014540+02:00;True|2021-10-21T08:48:38.0576948+02:00;True|2021-10-21T08:48:31.5097766+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
</PropertyGroup>
</Project>
-2
View File
@@ -42,8 +42,6 @@ namespace LiMan.Serv
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
//app.UseSwagger();
//app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "LiMan.Serv v1"));
}
app.UseSwagger(c =>
+8 -7
View File
@@ -1,9 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
}
}
+11
View File
@@ -0,0 +1,11 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "PROD"
}
+11
View File
@@ -0,0 +1,11 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Environment": "STAG"
}
+2 -2
View File
@@ -8,8 +8,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;",
"LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;",
"LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"Redis": "localhost:6379"
}
}
+1
View File
@@ -0,0 +1 @@