From 814624c36fc8b87a643999d92b618c09df763333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=AF=85?= <2667210109@qq.com> Date: Sat, 19 Oct 2024 21:01:07 +0800 Subject: [PATCH] 1 --- asg_form.sln | 6 ++++++ asg_form/Program.cs | 1 + asg_form/Properties/serviceDependencies.json | 4 ++++ asg_form/Properties/serviceDependencies.local.json | 10 ++++++++++ asg_form/asg_form.csproj | 6 ++++++ 5 files changed, 27 insertions(+) create mode 100644 asg_form/Properties/serviceDependencies.local.json diff --git a/asg_form.sln b/asg_form.sln index 5e0c515..ddc65ce 100644 --- a/asg_form.sln +++ b/asg_form.sln @@ -12,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决 main.md = main.md EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asg_form.ServiceDefaults", "asg_form.ServiceDefaults\asg_form.ServiceDefaults.csproj", "{01C5D56B-F869-4305-B338-8B29331A49CD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -22,6 +24,10 @@ Global {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Release|Any CPU.Build.0 = Release|Any CPU + {01C5D56B-F869-4305-B338-8B29331A49CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01C5D56B-F869-4305-B338-8B29331A49CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01C5D56B-F869-4305-B338-8B29331A49CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01C5D56B-F869-4305-B338-8B29331A49CD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/asg_form/Program.cs b/asg_form/Program.cs index 7f61a84..fcc81e1 100644 --- a/asg_form/Program.cs +++ b/asg_form/Program.cs @@ -174,6 +174,7 @@ services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) IssuerSigningKey = secKey }; }); +builder.Services.AddApplicationInsightsTelemetry(); var app = builder.Build(); diff --git a/asg_form/Properties/serviceDependencies.json b/asg_form/Properties/serviceDependencies.json index 1b692cd..e155623 100644 --- a/asg_form/Properties/serviceDependencies.json +++ b/asg_form/Properties/serviceDependencies.json @@ -7,6 +7,10 @@ "type": "mssql", "connectionId": "ConnectionStrings", "dynamicId": null + }, + "appInsights1": { + "type": "appInsights", + "connectionId": null } } } \ No newline at end of file diff --git a/asg_form/Properties/serviceDependencies.local.json b/asg_form/Properties/serviceDependencies.local.json new file mode 100644 index 0000000..3139a7a --- /dev/null +++ b/asg_form/Properties/serviceDependencies.local.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "appInsights1": { + "secretStore": null, + "resourceId": null, + "type": "appInsights.sdk", + "connectionId": null + } + } +} \ No newline at end of file diff --git a/asg_form/asg_form.csproj b/asg_form/asg_form.csproj index b23c67f..0c70322 100644 --- a/asg_form/asg_form.csproj +++ b/asg_form/asg_form.csproj @@ -27,6 +27,7 @@ + @@ -37,6 +38,7 @@ + @@ -77,6 +79,10 @@ + + + + PreserveNewest