From 139ffdc3225a32a5d9bbe1a89a7037941ad4e0cf Mon Sep 17 00:00:00 2001 From: zwb Date: Wed, 30 Oct 2024 14:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LoongPanel-Asp.sln.DotSettings.user | 3 +++ LoongPanel-Asp/Properties/launchSettings.json | 6 +++--- LoongPanel-Asp/Servers/EmailService.cs | 9 ++++++++- LoongPanel-Asp/appsettings.json | 2 +- web/.env | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/LoongPanel-Asp.sln.DotSettings.user b/LoongPanel-Asp.sln.DotSettings.user index c1ff35d..fe95b55 100755 --- a/LoongPanel-Asp.sln.DotSettings.user +++ b/LoongPanel-Asp.sln.DotSettings.user @@ -1,4 +1,7 @@  + ForceIncluded + ForceIncluded + ForceIncluded True <AssemblyExplorer> <Assembly Path="C:\Users\niyyz\.nuget\packages\czgl.systeminfo\2.2.0\lib\net7.0\CZGL.SystemInfo.dll" /> diff --git a/LoongPanel-Asp/Properties/launchSettings.json b/LoongPanel-Asp/Properties/launchSettings.json index 49f06be..1a51e2d 100755 --- a/LoongPanel-Asp/Properties/launchSettings.json +++ b/LoongPanel-Asp/Properties/launchSettings.json @@ -4,7 +4,7 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://192.168.1.22:58826", + "applicationUrl": "http://127.0.0.1:58826", "sslPort": 44304 } }, @@ -14,7 +14,7 @@ "dotnetRunMessages": true, "launchBrowser": false, "launchUrl": "swagger", - "applicationUrl": "http://192.168.1.22:5000", + "applicationUrl": "http://127.0.0.1::5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -24,7 +24,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://192.168.1.22:7233;http://192.168.1.22:5253", + "applicationUrl": "https://127.0.0.1::7233;http://127.0.0.1::5253", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/LoongPanel-Asp/Servers/EmailService.cs b/LoongPanel-Asp/Servers/EmailService.cs index a9fa79c..5bdf0bc 100644 --- a/LoongPanel-Asp/Servers/EmailService.cs +++ b/LoongPanel-Asp/Servers/EmailService.cs @@ -19,7 +19,14 @@ public class EmailService:IDisposable // 初始化SmtpClient _smtpClient = new SmtpClient(); _smtpClient.Connect(_emailSettings["Host"], int.Parse(_emailSettings["Port"] ?? throw new InvalidOperationException()), true); - _smtpClient.Authenticate(_emailSettings["Username"], _emailSettings["Password"]); + try + { + _smtpClient.Authenticate(_emailSettings["Username"], _emailSettings["Password"]); + } + catch (Exception e) + { + Console.WriteLine(e); + } } diff --git a/LoongPanel-Asp/appsettings.json b/LoongPanel-Asp/appsettings.json index 921d13d..4107133 100755 --- a/LoongPanel-Asp/appsettings.json +++ b/LoongPanel-Asp/appsettings.json @@ -8,7 +8,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "DefaultConnection": "Host=192.168.0.26;Port=54321;Username=SYSTEM;Password=loongnix;Database=app", + "DefaultConnection": "Host=127.0.0.1;Port=54321;Username=SYSTEM;Password=loongnix;Database=app", "SqliteConnection": "Data Source=./app.db;" }, "EmailSettings": { diff --git a/web/.env b/web/.env index 1a8b765..26bfb86 100644 --- a/web/.env +++ b/web/.env @@ -1 +1 @@ -NUXT_API_URL="127.0.0.1:5000" \ No newline at end of file +NUXT_API_URL="http://127.0.0.1:5000" \ No newline at end of file