diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user
index 754e7d06b..8fd09928c 100644
--- a/Host/Host.csproj.user
+++ b/Host/Host.csproj.user
@@ -1,4 +1,4 @@
-
+
C:\Projects\Bewo\BeWo - Main\Host\Properties\PublishProfiles\FolderProfile.pubxml
diff --git a/Server/Components/ServerUtils/ServerUtils.csproj b/Server/Components/ServerUtils/ServerUtils.csproj
index 15cb3f15b..1053f7b03 100644
--- a/Server/Components/ServerUtils/ServerUtils.csproj
+++ b/Server/Components/ServerUtils/ServerUtils.csproj
@@ -78,12 +78,6 @@
-
-
- {2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}
- Shared
-
-
@@ -94,5 +88,11 @@
+
+
+ {2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}
+ Shared
+
+
\ No newline at end of file
diff --git a/Service/Core/ServiceLogger.cs b/Service/Core/ServiceLogger.cs
index b365b3c69..8cefc1df2 100644
--- a/Service/Core/ServiceLogger.cs
+++ b/Service/Core/ServiceLogger.cs
@@ -14,6 +14,8 @@ namespace BeWo.Service.Core
public static FileLogger WCFErrorLogger { get; } = new FileLogger(BeWoServerPathHelper.GetWCFErrorLogFile());
public static FileLogger JsonErrorLogger { get; } = new FileLogger(BeWoServerPathHelper.GetJsonErrorLogFile());
+ //public static FileLogger AiLogger { get; } = new FileLogger(BeWoServerPathHelper.GetAiServiceLogFile());
+
public static FileLogger GetRequestLogger()
{
var filePath = BeWoServerPathHelper.GetUniqueRequestLogFile();
diff --git a/Service/Plugins/AiPromptbausteineService.cs b/Service/Plugins/AiPromptbausteineService.cs
index 5da00ff93..464897c93 100644
--- a/Service/Plugins/AiPromptbausteineService.cs
+++ b/Service/Plugins/AiPromptbausteineService.cs
@@ -1,10 +1,13 @@
using AICore.Facade;
+using BeWo.Data;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Data.Utils;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
+using BeWo.Service.ServiceProxy;
using BS.Shared;
+using BS.Shared.Core;
using BS.Shared.DataContracts.Feature.AI;
using BS.Shared.Extensions;
using System;
@@ -20,6 +23,8 @@ namespace BeWo.Service.Plugins
{
public class AiPromptbausteineService
{
+ public string Tenant => MultitenancyOperationContextExt.Current?.Tenant;
+
public IEnumerable GetAiPromptbausteinFolder(AiActionType aiActionType)
{
var own_bib = getOwnFolder(aiActionType);
@@ -239,9 +244,21 @@ namespace BeWo.Service.Plugins
}
private List getOwnSoftPrompts(AiActionType aiActionType)
{
- var client = new AiPromptsApiClient();
- var response = client.GetAiPrompts(aiActionType);
- return response?.ToList() ?? new List();
+ try
+ {
+ var client = new AiPromptsApiClient();
+ var response = client.GetAiPrompts(aiActionType);
+ return response?.ToList() ?? new List();
+ }
+ catch(Exception ex)
+ {
+ throw ex;
+ //var error = ex.ToString();
+ //Core.Utils.SendErrorMail("subject - test", "body - test");
+ //MailUtils.SendAiModuleErrorMail("GetOwnSoftPrompts", error, Tenant);
+ }
+
+ return new List();
}
}
}
diff --git a/Shared/Core/AppSettingReader.cs b/Shared/Core/AppSettingReader.cs
index 42a37d747..1c7b392a8 100644
--- a/Shared/Core/AppSettingReader.cs
+++ b/Shared/Core/AppSettingReader.cs
@@ -65,7 +65,7 @@ namespace BS.Shared.Core
var setting = ConfigurationManager.AppSettings.Get(setting_path);
if (bool.TryParse(setting, out var rtn))
return rtn;
- return true;
+ return false;
}
private static string GetSendMailModuleUser(string key)
{
diff --git a/Shared/Core/MailUtils.cs b/Shared/Core/MailUtils.cs
index c39374dd3..fb40d5b97 100644
--- a/Shared/Core/MailUtils.cs
+++ b/Shared/Core/MailUtils.cs
@@ -15,6 +15,10 @@ namespace BS.Shared.Core
{
private static readonly Module _GKV_Module = new Module("Gkv", "GKV/EDI/EDAT");
private static readonly Module _GKV_Module2 = new Module("GkvTest", "GKV/EDI/EDAT");
+ private static readonly Module _AI_Module = new Module("Ai", "AI");
+
+ public static bool SendAiModuleErrorMail(string title, string body, string tenant)
+ => SendModuleErrorMail(_AI_Module, title, body, tenant);
public static bool SendGkvModuleErrorMail(string title, Exception e, string tenant)
=> SendGkvModuleErrorMail(title, "Exception gefunden: " + e.ToString(), tenant);
@@ -48,9 +52,13 @@ namespace BS.Shared.Core
body += "\n\n" + tenant_str;
string server = AppRequestSender.GetServerFromTenant(tenant);
- string server_str = "Server: " + (server ?? "unkown");
+ string server_str = "Kundenserver: " + (server ?? "unkown");
body += "\n" + server_str;
+ string hostname = Dns.GetHostName();
+ string hostname_str = "Hostname: " + (hostname ?? "unknown");
+ body += "\n" + hostname_str;
+
return SendEmail(subject, body, toAddress, senderName, senderEMail, smtpServer, smtpUser, smtpPassword, sendAsync);
}