16 Commits

Author SHA1 Message Date
Developer01
de918b1e88 Verbesserung der Stabilität und Fehlerbehandlung
- `MSSQLServer.vb`: Konvertierung von `Nothing`-Werten zu `DBNull.Value` und detaillierte Protokollierung von SQL-Fehlern hinzugefügt.
- `AssemblyInfo.vb`: Aktualisierung der Assembly-Version auf `2.4.0.0`.
- `Client.vb`: Einführung von `_IsReconnecting`, um parallele Reconnects zu verhindern. Verbesserte Fehlerbehandlung, Protokollierung und Ressourcenfreigabe.
- `MailSession.vb`: Konsistentere Protokollierung, Änderung von `Info` zu `Debug` beim Schließen der Verbindung.
- `EDMI.API.vbproj`: Hinzufügen der Datei `ErrorLog.txt`.
- `ErrorLog.txt`: Dokumentation von Timeout- und Verbindungsproblemen mit detaillierten Stack-Traces.

Diese Änderungen verbessern die Stabilität, Fehlertoleranz und Protokollierungsqualität der Anwendung.
2026-09-29 15:49:15 +02:00
Developer01
298a398067 Neue Funktionen und Projektaktualisierungen
Es wurde eine neue Funktion `GetServiceStatus` zur Klasse `Client` hinzugefügt, die einen Live-Monitoring-Snapshot vom Service abruft. In `ClientStatus` wurde die Eigenschaft `ClientId` als reguläre Eigenschaft hinzugefügt.

In `Reference.vb` wurden zahlreiche neue Methoden für Datenbank- und Dateioperationen implementiert, sowohl synchron als auch asynchron. Dazu gehören Funktionen wie `ReturnDatatable`, `NewFile`, `GetFileByObjectId` und `TestObjectIdExists`. Bestehende Methoden wurden überarbeitet, um die Lesbarkeit zu verbessern.

Die Datei `LogConfig.vb` wurde angepasst, indem eine Debug-Log-Meldung entfernt wurde. In `AssemblyInfo.vb` wurde die Version auf `2.7.0.0` aktualisiert. Ein neues Projekt `EDMIService` wurde zur Lösung hinzugefügt, einschließlich der entsprechenden Build-Konfigurationen.
2026-09-25 13:57:32 +02:00
Developer01
6aebeaa446 Merge branch 'master' of https://vcs.digitaldata.works/AppStd/Modules 2026-09-22 16:36:33 +02:00
Developer01
ed655879f9 Verbesserung von Stabilität und Fehlerbehandlung
- Implementierung von `IDisposable` in der Klasse `Client`, um Ressourcen wie Timer und Kanäle ordnungsgemäß freizugeben.
- Einführung von `ActiveClients` und `ClientStatus` zur Verfolgung und Statusanzeige aktiver Clients.
- Verbesserte Fehlerbehandlung mit der Methode `HandleCommunicationError`, die Kommunikationsfehler protokolliert, den Client offline setzt und einen Reconnect auslöst.
- Optimierung der Reconnect-Logik mit asynchronen Wiederverbindungsversuchen und gestaffelten Verzögerungen.
- Erweiterung der Konstruktoren in `Client` um einen optionalen `pClientName`-Parameter und Generierung eines eindeutigen `ClientId`.
- Verbesserte Timer-Logik und asynchrone Verarbeitung in `UpdateTimer_Elapsed`.
- Einführung der Methode `EnsureAvailable`, um sicherzustellen, dass der Kanal vor Service-Aufrufen verfügbar ist.
- Hinzufügen asynchroner Varianten für Service-Methoden (`GetDatatable`, `GetScalarValue`, `ExecuteNonQuery`) und Fallback auf direkte Datenbankzugriffe.
- Verbesserte Timeout-Einstellungen und Verbindungsverwaltung in der Klasse `Channel`.
- Erweiterungen in `DatabaseWithFallback` für asynchrone Methoden und detaillierteres Logging.
- Aktualisierung der Assembly-Version auf `2.7.0`.
2026-09-22 16:36:20 +02:00
e598b6faf5 Modules.Jobs: Version 3.9.0.0 2026-09-21 15:06:43 +02:00
1ad055d958 Modules.Interfaces: Version 2.5.0.0 2026-09-21 15:06:06 +02:00
953cc10416 Modules.Jobs:
- EBINTERFACE_61: Aufruf externer Prozedur ermöglicht. Konfiguration über TBDD_SQL_COMMANDS.
- Absicherung der Emai-Funktion
2026-09-21 15:05:02 +02:00
1615727352 Modules.Interfaces: Fehlerhandling beim Auslesen der Knoten verbessert (Komplexe Typen werden abgefangen, und Arrays werden geprüft und kontrolliert ausgelesen) 2026-09-18 15:20:23 +02:00
Developer01
857e1366fe Merge branch 'master' of https://vcs.digitaldata.works/AppStd/Modules 2026-09-17 12:35:49 +02:00
Developer01
d3ebc13eae Fehlerbehandlung & PDF-Stabilität verbessert
In `MSSQLServer.vb` wurde die Fehlerbehandlung erweitert, indem Fehler beim Öffnen einer Verbindung (`pConnection.Open`) nun protokolliert werden.
Die Versionsinformationen in `AssemblyInfo.vb` wurden von `3.8.1.0` auf `3.8.2.0` aktualisiert.
In `XRechnungViewDocument.vb` wurde die Methode `RenderLabelValuePair` angepasst, um Eingabewerte mit der neuen Methode `SanitizeForPdf` zu bereinigen. Diese entfernt problematische Unicode-Zeichen, die Abstürze beim PDF-Rendering verursachen könnten, und protokolliert entfernte Zeichen. Dies erhöht die Stabilität und Sicherheit.
2026-09-17 12:35:36 +02:00
18e8610edc Merge branch 'master' of https://vcs.digitaldata.works/AppStd/Modules 2026-09-11 16:24:45 +02:00
d98e903160 Modules.Interface: Zuordnung EBINTERFACE-6.1 DocumentType zu UNTDID1010-Wert 2026-09-10 15:26:25 +02:00
Developer01
3c1b51f519 Merge branch 'master' of https://vcs.digitaldata.works/AppStd/Modules 2026-09-10 14:41:15 +02:00
Developer01
e56be8a6fe Verbessere Logging und aktualisiere Assembly-Versionen
Die Logik in `ConfigManager(Of T)` wurde angepasst, um bei Fehlern beim Laden der App-Konfiguration detailliertere Informationen (Pfad und Fehlergrund) zu protokollieren.

In `AssemblyInfo.vb` wurden die Trademark-Version, Assembly-Version und File-Version von `1.4.0.0` auf `1.5.0.0` aktualisiert.
2026-09-10 14:40:55 +02:00
1871cca2a6 Modules.Interface: Bei Item_Type = 2 wird der Wert in eine decimal-Zahl mit 2 Nachkommastellen umgewandelt, abhängig vom Dezimaltrennzeichen 2026-09-10 14:30:21 +02:00
676b43bbe1 Modules.Interfaces & Modules.Jobs: Neue eInvoice Spezifikation "ebInterface 6.1" implementiert
Logik zum Abfragen von Attributen von root ergänzt
2026-09-07 16:59:58 +02:00
27 changed files with 6425 additions and 1754 deletions

View File

@@ -235,13 +235,11 @@ Public Class ConfigManager(Of T)
Try
Dim oAppConfig = ReadFromFile(_AppConfigPath)
CopyValues(oAppConfig, Config)
_Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath)
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn("ApplicationConfig could not be loaded!")
_Logger.Warn("ApplicationConfig could not be loaded! Path: [{0}] Reason: {1}", _AppConfigPath, ex.Message)
End Try
_WriteAllValuesToUserConfig = False
Else
_Logger.Debug("ApplicationConfig does not exist.")

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
<Assembly: AssemblyProduct("Modules.Config")>
<Assembly: AssemblyCopyright("Copyright © 2026")>
<Assembly: AssemblyTrademark("1.4.0.0")>
<Assembly: AssemblyTrademark("1.5.0.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.4.0.0")>
<Assembly: AssemblyFileVersion("1.4.0.0")>
<Assembly: AssemblyVersion("1.5.0.0")>
<Assembly: AssemblyFileVersion("1.5.0.0")>

View File

@@ -255,6 +255,7 @@ Public Class MSSQLServer
Return pConnection
Catch ex As Exception
Logger.Error("Error while opening Connection!")
Logger.Error(ex)
@@ -493,14 +494,30 @@ Public Class MSSQLServer
pSqlCommandObject.Connection = pSqlConnection
pSqlCommandObject.Transaction = oTransaction
pSqlCommandObject.CommandTimeout = pTimeout
' Sicherstellen, dass Nothing-Werte als DBNull übergeben werden
For Each oParam As SqlParameter In pSqlCommandObject.Parameters
If oParam.Value Is Nothing Then
Logger.Warn("ExecuteNonQueryWithConnectionObject: Parameter [{0}] was Nothing - converting to DBNull.Value", oParam.ParameterName)
oParam.Value = DBNull.Value
End If
Next
pSqlCommandObject.ExecuteNonQuery()
Return True
Catch ex As SqlException
Logger.Warn("ExecuteNonQueryWithConnectionObject: SQL Error while executing command: [{0}]", pSqlCommandObject.CommandText)
Logger.Warn("Parameters: [{0}]", GetParameterListAsString(pSqlCommandObject))
For Each sqlError As SqlError In ex.Errors
Logger.Error("SQL Error #{0} (Severity {1}, State {2}, Line {3}): {4}",
sqlError.Number, sqlError.Class, sqlError.State, sqlError.LineNumber, sqlError.Message)
Next
Return False
Catch ex As Exception
Dim omsg = $"Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{pSqlCommandObject.CommandText}]"
Logger.Warn(omsg)
Logger.Warn("Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{0}]", pSqlCommandObject.CommandText)
Logger.Warn("Parameters: [{0}]", GetParameterListAsString(pSqlCommandObject))
Logger.Error(ex)
Return False
Finally
MaybeCommitTransaction(oTransaction, pTransactionMode)

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Database")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.3.7.0")>
<Assembly: AssemblyTrademark("2.4.0.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.7.0")>
<Assembly: AssemblyFileVersion("2.3.7.0")>
<Assembly: AssemblyVersion("2.4.0.0")>
<Assembly: AssemblyFileVersion("2.4.0.0")>

View File

@@ -1,5 +1,6 @@
Imports System.IO
Imports System.ServiceModel
Imports System.Threading
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
@@ -7,6 +8,7 @@ Imports DigitalData.Modules.EDMI.API.Rights
Imports DigitalData.Modules.Logging
Public Class Client
Implements IDisposable
' Constants
Private Const UPDATE_INTERVAL_IN_MINUTES As Integer = 1
@@ -22,10 +24,59 @@ Public Class Client
Private _ClientConfig As GlobalStateClientConfiguration
Private _CachedTables As New List(Of String)
Private _IsOnline As Boolean
' Verhindert parallele Reconnect-Versuche (0 = frei, 1 = läuft)
Private _IsReconnecting As Integer = 0
Private _Channel As IEDMIServiceChannel
Private _ClientName As String
' Static Registry
Private Shared ReadOnly _ActiveClients As New Collections.Concurrent.ConcurrentDictionary(Of String, ClientStatus)
Private ReadOnly _ClientId As String ' ← Neu: eindeutiger interner Key
Public Shared ReadOnly Property ActiveClients As IReadOnlyDictionary(Of String, ClientStatus)
Get
Return _ActiveClients
End Get
End Property
''' <summary>
''' Returns a snapshot of all currently registered client instances
''' </summary>
Public Shared Function GetAllClientStatus() As List(Of ClientStatus)
Return _ActiveClients.Values.ToList()
End Function
' Update Timer
Private WithEvents UpdateTimer As New Timers.Timer
Private _Disposed As Boolean = False
''' <summary>
''' Closes the channel and releases all resources
''' </summary>
Public Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
Protected Overridable Sub Dispose(disposing As Boolean)
If _Disposed Then Return
If disposing Then
_IsOnline = False ' ← Reconnect-Guard deaktivieren
UpdateTimer.Stop()
UpdateTimer.Dispose()
' Auf laufenden Reconnect warten
Dim oTimeout = DateTime.Now.AddSeconds(5)
While _IsReconnecting = 1 AndAlso DateTime.Now < oTimeout
Task.Delay(100).Wait()
End While
If _Channel IsNot Nothing Then
Channel.CloseChannel(_Channel)
_Channel = Nothing
End If
Dim oRemoved As ClientStatus = Nothing
_ActiveClients.TryRemove(_ClientId, oRemoved)
Logger.Debug("Client [{0}] unregistered. Total active clients: [{1}]", _ClientName, _ActiveClients.Count)
End If
_Disposed = True
End Sub
' Public Variables
Public ReadOnly Property CachedTables
@@ -72,12 +123,15 @@ Public Class Client
''' </summary>
''' <param name="pLogConfig">LogConfig object</param>
''' <param name="pServiceAdress">The IP address/hostname and port, separated by semicolon or colon, ex. 1.2.3.4:9000</param>
Public Sub New(pLogConfig As LogConfig, pServiceAdress As String)
''' <param name="pClientName">Optional identifier for this client instance (e.g. application name or hostname)</param>
Public Sub New(pLogConfig As LogConfig, pServiceAdress As String, Optional pClientName As String = "")
LogConfig = pLogConfig
Logger = pLogConfig.GetLogger()
_ClientName = If(String.IsNullOrWhiteSpace(pClientName), Environment.MachineName, pClientName)
_ClientId = $"{_ClientName}_{Guid.NewGuid().ToString("N").Substring(0, 8)}" ' ← eindeutig
UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES
UpdateTimer.Start()
' Start erfolgt in Connect()
Try
Dim oConnection = New Connection()
@@ -85,8 +139,8 @@ Public Class Client
ChannelManager = New Channel(pLogConfig, _ServerAddress)
AddHandler ChannelManager.Reconnect, AddressOf Reconnect
Logger.Debug("Ready for connection to Service at: [{0}:{1}]", _ServerAddress.Host, _ServerAddress.Port)
Logger.Debug("Ready for connection to Service at: [{0}:{1}] | ClientName=[{2}] | ClientId=[{3}]",
_ServerAddress.Host, _ServerAddress.Port, _ClientName, _ClientId)
Catch ex As Exception
Logger.Error(ex)
End Try
@@ -98,12 +152,14 @@ Public Class Client
''' <param name="pLogConfig">LogConfig object</param>
''' <param name="pIPAddress">The IP address to connect to</param>
''' <param name="pPortNumber">The Port number to use for the connection</param>
Public Sub New(pLogConfig As LogConfig, pIPAddress As String, pPortNumber As Integer)
''' <param name="pClientName">Optional identifier for this client instance (e.g. application name or hostname)</param>
Public Sub New(pLogConfig As LogConfig, pIPAddress As String, pPortNumber As Integer, Optional pClientName As String = "")
LogConfig = pLogConfig
Logger = pLogConfig.GetLogger()
_ClientName = If(String.IsNullOrWhiteSpace(pClientName), Environment.MachineName, pClientName)
_ClientId = $"{_ClientName}_{Guid.NewGuid().ToString("N").Substring(0, 8)}" ' ← eindeutig
UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES
UpdateTimer.Start()
Try
Dim oConnection = New Connection()
@@ -111,13 +167,12 @@ Public Class Client
ChannelManager = New Channel(pLogConfig, _ServerAddress)
AddHandler ChannelManager.Reconnect, AddressOf Reconnect
Logger.Debug("Ready for connection to Service at: [{0}:{1}]", _ServerAddress.Host, _ServerAddress.Port)
Logger.Debug("Ready for connection to Service at: [{0}:{1}] | ClientName=[{2}] | ClientId=[{3}]",
_ServerAddress.Host, _ServerAddress.Port, _ClientName, _ClientId)
Catch ex As Exception
Logger.Error(ex)
End Try
End Sub
''' <summary>
''' Connect to the service
''' </summary>
@@ -133,17 +188,32 @@ Public Class Client
If oResponse.OK Then
_ClientConfig = oResponse.ClientConfig
Else
Logger.Warn("Client Configuration could not be loaded: [{0}]", oResponse.ErrorMessage)
Logger.Warn("⚠Client Configuration could not be loaded: [{0}]", oResponse.ErrorMessage)
End If
Logger.Info($"Connection to AppService [{ServerAddress}] successfully established!")
Logger.Info("✔✔Connection to AppService [{0}] successfully established! | Client=[{1}] | Id=[{2}]",
ServerAddress, _ClientName, _ClientId)
_IsOnline = True
' CachedTables sofort befüllen – nicht auf den ersten Timer-Tick warten
Try
Dim oTables As String() = _Channel.GetCachedTables()
_CachedTables = oTables.Select(Function(t) t.ToUpper).ToList()
Logger.Debug("✔ CachedTables loaded on connect: [{0}]", _CachedTables.Count)
Catch ex As Exception
Logger.Warn("⚠ CachedTables could not be loaded on connect: {0}", ex.Message)
_CachedTables = New List(Of String)
End Try
_IsOnline = True ' ← vor GetStatus()
UpdateTimer.Start()
' In Registry eintragen – jetzt mit korrektem IsOnline=True
_ActiveClients(_ClientId) = GetStatus()
Logger.Info("Client [{0}] registered with Id=[{1}]. Total active clients: [{2}]", _ClientName, _ClientId, _ActiveClients.Count)
Return True
Catch ex As Exception
_IsOnline = False
Logger.Error(ex)
Return False
End Try
@@ -152,32 +222,99 @@ Public Class Client
''' <summary>
''' Aborts the channel and creates a new connection
''' </summary>
Public Sub Reconnect()
Logger.Warn("Connection faulted. Trying to reconnect..")
Public Async Sub Reconnect(Optional sender As Object = Nothing, Optional e As EventArgs = Nothing)
' Nur ein Reconnect gleichzeitig erlauben – atomar prüfen und setzen
If Interlocked.CompareExchange(_IsReconnecting, 1, 0) = 1 Then
Logger.Debug("Reconnect already in progress – skipping duplicate call.")
Return
End If
Try
_Channel.Abort()
_Channel = ChannelManager.GetChannel()
_Channel.Open()
Logger.Warn("⚠ Connection faulted. Trying to reconnect..")
_IsOnline = True
Catch ex As Exception
Logger.Error(ex)
Dim oRetryDelays = {2, 5, 15, 30}
For Each oDelay In oRetryDelays
Try
Await Task.Delay(TimeSpan.FromSeconds(oDelay))
Logger.Debug("Reconnect attempt after [{0}]s delay...", oDelay)
Channel.CloseChannel(_Channel)
_Channel = ChannelManager.GetChannel()
_Channel.Open()
_IsOnline = True
If _ActiveClients.ContainsKey(_ClientId) Then
_ActiveClients(_ClientId) = GetStatus()
End If
Logger.Info("✔ Reconnect successful.")
Return
Catch ex As Exception
Logger.Warn("⚠ Reconnect failed after [{0}]s: {1}", oDelay, ex.Message)
_IsOnline = False
End Try
Next
Logger.Error("All reconnect attempts failed. Service unavailable.")
Finally
' Flag immer zurücksetzen – auch bei unerwarteten Fehlern
Interlocked.Exchange(_IsReconnecting, 0)
End Try
End Sub
Private Async Function UpdateTimer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) As Task Handles UpdateTimer.Elapsed
Private Async Sub UpdateTimer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) Handles UpdateTimer.Elapsed
Try
If _Channel Is Nothing OrElse _Channel.State <> CommunicationState.Opened Then
Logger.Warn("⚠ UpdateTimer skipped: Channel not in Opened state [{0}]", If(_Channel IsNot Nothing, _Channel.State.ToString(), "null"))
_IsOnline = False
Reconnect(sender, e)
Return
End If
If Not _IsOnline Then
Logger.Debug("UpdateTimer skipped: Client is offline.")
Return
End If
Dim oTables As String() = Await _Channel.GetCachedTablesAsync()
' ◄ NullReferenceException-Schutz: Service kann Nothing zurückgeben
If oTables Is Nothing Then
Logger.Warn("⚠ UpdateTimer: GetCachedTablesAsync returned Nothing.")
_CachedTables = New List(Of String)
Return
End If
_CachedTables = oTables.
Select(Function(table) table.ToUpper).
ToList()
Select(Function(table) table.ToUpper).
ToList()
Logger.Info("✔ Channel state: [{0}] | Active connections: [{1}] | CachedTables: [{2}]",
_Channel.State,
Channel.ActiveConnections,
_CachedTables.Count)
If _ActiveClients.ContainsKey(_ClientId) Then
_ActiveClients(_ClientId) = GetStatus()
End If
Catch ex As TimeoutException
' Stale TCP connection (z.B. Firewall/Citrix Idle-Timeout)
Logger.Warn("⚠ UpdateTimer: TCP connection lost (idle timeout / firewall). Triggering reconnect...")
_IsOnline = False
Reconnect()
Catch ex As CommunicationException
Logger.Warn("⚠ UpdateTimer: Channel faulted. Triggering reconnect...")
_IsOnline = False
Reconnect()
Catch ex As Exception
Logger.Warn("Update of CachedTable was not successful!")
Logger.Warn("⚠ Update of CachedTable was not successful!")
Logger.Error(ex)
_CachedTables = New List(Of String)
End Try
End Function
End Sub
''' <summary>
''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object
@@ -460,7 +597,7 @@ Public Class Client
Dim oResult = _Channel.ExecuteNonQuery_MSSQL_IDB(oSql)
If oResult.OK = False Then
Logger.Warn("Error while deleting Term object")
Logger.Warn("⚠ Error while IDBNewObjectData")
Logger.Error(oResult.ErrorMessage)
End If
@@ -477,7 +614,7 @@ Public Class Client
Dim oResult = _Channel.ExecuteNonQuery_MSSQL_IDB(oDELSQL)
If oResult.OK = False Then
Logger.Warn("Error while deleting Term object")
Logger.Warn("⚠ Error while deleting Term object")
Logger.Error(oResult.ErrorMessage)
End If
@@ -490,268 +627,349 @@ Public Class Client
#Region "GetDatatable"
Public Function GetDatatableFromIDB(pSQL As String) As GetDatatableResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With {
Return _Channel.ReturnDatatable(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromIDB))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromIDB))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function GetDatatableFromECM(pSQL As String) As GetDatatableResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With {
Return _Channel.ReturnDatatable(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromECM))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromECM))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function GetDatatableFromConnection(pSQL As String, pConnectionId As Integer) As GetDatatableResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With {
Return _Channel.ReturnDatatable(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromConnection))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromConnection))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetDatatableFromIDBAsync(pSQL As String) As Task(Of GetDatatableResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
Return Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromIDBAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromIDBAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetDatatableFromECMAsync(pSQL As String) As Task(Of GetDatatableResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
Logger.Debug("GetDatatableFromECMAsync will be called with SQL [{0}]", pSQL)
Return Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromECMAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromECMAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetDatatableFromConnectionAsync(pSQL As String, Optional pConnectionId As Integer = 0) As Task(Of GetDatatableResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
Return Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableFromConnectionAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableFromConnectionAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
#End Region
#Region "GetScalarValue"
Public Function GetScalarValueFromIDB(pSQL As String) As GetScalarValueResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
Return _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromIDB))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromIDB))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function GetScalarValueFromECM(pSQL As String) As GetScalarValueResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
Return _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromECM))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromECM))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function GetScalarValueFromConnection(pSQL As String, pConnectionId As Integer) As GetScalarValueResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
Return _Channel.ReturnScalarValue(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromConnection))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromConnection))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetScalarValueFromIDBAsync(pSQL As String) As Task(Of GetScalarValueResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
Return Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromIDBAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromIDBAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetScalarValueFromECMAsync(pSQL As String) As Task(Of GetScalarValueResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
Return Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromECMAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromECMAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetScalarValueFromConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of GetScalarValueResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
Return Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetScalarValueFromConnectionAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetScalarValueFromConnectionAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
#End Region
#Region "ExecuteNonQuery"
Public Function ExecuteNonQueryFromIDB(pSQL As String) As ExecuteNonQueryResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
Return _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromIDB))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromIDB))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function ExecuteNonQueryFromECM(pSQL As String) As ExecuteNonQueryResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
Return _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromECM))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromECM))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Function ExecuteNonQueryFromConnection(pSQL As String, pConnectionId As Integer) As ExecuteNonQueryResponse
EnsureAvailable()
Try
Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
Return _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromConnection))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromConnection))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function ExecuteNonQueryFromIDBAsync(pSQL As String) As Task(Of ExecuteNonQueryResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
Return Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.IDB
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromIDBAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromIDBAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function ExecuteNonQueryFromECMAsync(pSQL As String) As Task(Of ExecuteNonQueryResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
Return Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.ECM
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromECMAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromECMAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function ExecuteNonQueryFromConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of ExecuteNonQueryResponse)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
Return Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With {
.SqlCommand = pSQL,
.NamedDatabase = DatabaseName.None,
.ConnectionId = pConnectionId
})
Return oResponse
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromConnectionAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(ExecuteNonQueryFromConnectionAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
#End Region
Public Function GetDatatableByName(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As TableResult
EnsureAvailable()
Try
Dim oResponse = _Channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn)
Return oResponse
Return _Channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn)
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableByName))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableByName))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Public Async Function GetDatatableByNameAsync(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As Task(Of TableResult)
EnsureAvailable()
Try
Dim oResponse = Await _Channel.ReturnDatatableFromCacheAsync(DatatableName, FilterExpression, SortByColumn)
Return oResponse
Return Await _Channel.ReturnDatatableFromCacheAsync(DatatableName, FilterExpression, SortByColumn)
Catch ex As EndpointNotFoundException
HandleCommunicationError(ex, NameOf(GetDatatableByNameAsync))
Catch ex As CommunicationException
HandleCommunicationError(ex, NameOf(GetDatatableByNameAsync))
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
@@ -777,15 +995,15 @@ Public Class Client
Catch ex As FaultException(Of ObjectDoesNotExistFault)
Logger.Error(ex)
Throw ex
Throw
Catch ex As FaultException
Logger.Error(ex)
Throw ex
Throw
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
@@ -804,10 +1022,21 @@ Public Class Client
}
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
''' <summary>
''' Returns a live monitoring snapshot from the service (active sessions, users)
''' </summary>
Public Function GetServiceStatus() As ServiceStatusResponse
EnsureAvailable()
Try
Return _Channel.GetServiceStatus()
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
#Region "Private Functions"
@@ -819,6 +1048,55 @@ Public Class Client
Private Function GetUserName(pOverrideName) As String
Return ObjectEx.NotNull(pOverrideName, Environment.UserName)
End Function
''' <summary>
''' Throws InvalidOperationException if the channel is not ready for calls
''' </summary>
Private Sub EnsureAvailable()
If _Channel Is Nothing Then
Throw New InvalidOperationException("Channel is not initialized. Call Connect() first.")
End If
If Not _IsOnline Then
' Kurze Grace-Period abwarten, damit Reconnect() seinen _IsReconnecting-Flag setzen kann
Dim oGraceLimit = DateTime.Now.AddMilliseconds(600)
While DateTime.Now < oGraceLimit AndAlso _IsReconnecting = 0 AndAlso Not _IsOnline
Task.Delay(100).Wait()
End While
' Jetzt auf aktiven Reconnect warten
Dim oWaitLimit = DateTime.Now.AddSeconds(10)
While Not _IsOnline AndAlso DateTime.Now < oWaitLimit AndAlso _IsReconnecting = 1
Task.Delay(500).Wait()
Logger.Debug("EnsureAvailable: Waiting for reconnect... Channel=[{0}]", _Channel.State.ToString())
End While
If Not _IsOnline Then
Throw New InvalidOperationException("Client is offline.")
End If
End If
If _Channel.State <> CommunicationState.Opened Then
Throw New InvalidOperationException($"Channel is not available. State=[{_Channel.State}]")
End If
End Sub
''' <summary>
''' Logs the communication error, sets offline state, triggers reconnect and rethrows
''' </summary>
Private Sub HandleCommunicationError(ex As Exception, callerName As String)
Select Case True
Case TypeOf ex Is EndpointNotFoundException
Logger.Warn("⚠ Service not reachable (EndpointNotFoundException in [{0}]). Triggering reconnect...", callerName)
Case TypeOf ex Is CommunicationException
Logger.Warn("⚠ CommunicationException in [{0}] during call. Triggering reconnect...", callerName)
Case Else
Logger.Warn("⚠ Unexpected exception in [{0}] during call. Triggering reconnect...", callerName)
Logger.Error(ex)
End Select
_IsOnline = False
Reconnect()
Throw ex
End Sub
#End Region
#Region "Response Classes"
@@ -887,34 +1165,74 @@ Public Class Client
Select Case Type
Case AttributeTypeName.VECTOR_INTEGER
Return ValueBigInt
Case AttributeTypeName.BIG_INTEGER
Return ValueBigInt
Case AttributeTypeName.VECTOR_STRING
Return ValueText
Case AttributeTypeName.VARCHAR
Return ValueText
Case AttributeTypeName.BIT
Return IIf(ValueBigInt = 1, True, False)
Case AttributeTypeName.DATE
Return ValueDate
Case AttributeTypeName.DATETIME
Return ValueDate
Case AttributeTypeName.DECIMAL
Return ValueDecimal
Case AttributeTypeName.FLOAT
Return ValueDecimal
Case Else
Return Nothing
End Select
End Function
End Class
End Class ' ← ObjectAttribute endet hier
''' <summary>
''' Returns a detailed status snapshot of the current client state
''' </summary>
Public Function GetStatus() As ClientStatus
Return New ClientStatus() With {
.IsOnline = _IsOnline,
.ClientId = _ClientId, ' ← Neu
.ClientName = _ClientName,
.ServerAddress = Me.ServerAddress,
.ChannelState = If(_Channel IsNot Nothing, _Channel.State.ToString(), "null"),
.ActiveConnections = Channel.ActiveConnections,
.CachedTableCount = _CachedTables.Count,
.CachedTables = _CachedTables.ToList(),
.HasClientConfig = _ClientConfig IsNot Nothing,
.IsDisposed = _Disposed,
.TimerEnabled = UpdateTimer.Enabled,
.TimerIntervalSeconds = CInt(UpdateTimer.Interval / 1000),
.Timestamp = DateTime.Now
}
End Function
Public Class ClientStatus
Public Property IsOnline As Boolean
Public Property ClientId As String
Public Property ClientName As String
Public Property ServerAddress As String
Public Property ChannelState As String
Public Property ActiveConnections As Integer
Public Property CachedTableCount As Integer
Public Property CachedTables As List(Of String)
Public Property HasClientConfig As Boolean
Public Property IsDisposed As Boolean
Public Property TimerEnabled As Boolean
Public Property TimerIntervalSeconds As Integer
Public Property Timestamp As DateTime
Public Overrides Function ToString() As String
Return String.Format(
"[ClientStatus] ClientName=[{0}] Id=[{1}] Online=[{2}] Channel=[{3}]",
ClientName, ClientId, IsOnline, ChannelState)
End Function
Public Function Client_Who_ToString() As String
Return String.Format(
"[ClientStatus] Client=[{0}] Id=[{1}] Online=[{2}] Server=[{3}] Channel=[{4}]",
ClientName, ClientId, IsOnline, ServerAddress, ChannelState)
End Function
End Class ' ← ClientStatus endet hier – kein GetServiceStatus mehr drin
End Class

View File

@@ -1,4 +1,5 @@
Imports System.ServiceModel
Imports System.Threading
Imports System.Xml
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
@@ -10,31 +11,65 @@ Public Class Channel
Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel)
Public Event Reconnect As EventHandler
' Verbindungszähler
Private Shared _ActiveConnections As Integer = 0
Public Shared ReadOnly Property ActiveConnections As Integer
Get
Return _ActiveConnections
End Get
End Property
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
Return New NetTcpBinding() With {
.MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE,
.TransferMode = TransferMode.Streamed,
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
.ClientCredentialType = AuthenticationMode
}
},
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
.MaxArrayLength = Constants.ChannelSettings.MAX_ARRAY_LENGTH,
.MaxStringContentLength = Constants.ChannelSettings.MAX_STRING_CONTENT_LENGTH
.MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE,
.ListenBacklog = Constants.ChannelSettings.MAX_CONNECTIONS,
.MaxConnections = Constants.ChannelSettings.MAX_CONNECTIONS,
.TransferMode = TransferMode.Streamed,
.SendTimeout = TimeSpan.FromSeconds(30), ' ← War: 5min → Schnellere Fehlererkennung
.ReceiveTimeout = TimeSpan.FromMinutes(10), ' Keepalive < Firewall-Timeout (3600s) ✓
.OpenTimeout = TimeSpan.FromSeconds(30), ' ← Neu: Verbindungsaufbau begrenzen
.CloseTimeout = TimeSpan.FromSeconds(30),
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
.ClientCredentialType = AuthenticationMode
}
},
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
.MaxArrayLength = Constants.ChannelSettings.MAX_ARRAY_LENGTH,
.MaxStringContentLength = Constants.ChannelSettings.MAX_STRING_CONTENT_LENGTH
}
}
End Function
Public Sub New(pLogConfig As LogConfig, pServerAddress As ServerAddressStruct)
MyBase.New(pLogConfig)
ChannelFactory = GetChannelFactory(pServerAddress)
End Sub
''' <summary>
''' Closes a channel gracefully, falls back to Abort on error
''' </summary>
Public Shared Sub CloseChannel(pChannel As IEDMIServiceChannel)
If pChannel Is Nothing Then Return
Try
If pChannel.State = CommunicationState.Opened Then
pChannel.Close()
ElseIf pChannel.State = CommunicationState.Faulted OrElse
pChannel.State = CommunicationState.Closing Then
pChannel.Abort()
End If
' CommunicationState.Created / Closed → nichts tun, Zähler nicht betroffen
Catch ex As Exception
Try
pChannel.Abort()
Catch
' Ignore
End Try
End Try
End Sub
''' <summary>
''' Creates a channel and adds a Faulted-Handler
''' </summary>
@@ -44,21 +79,45 @@ Public Class Channel
Logger.Debug("Creating channel.")
Dim oChannel = ChannelFactory.CreateChannel()
AddHandler oChannel.Faulted, Sub() RaiseEvent Reconnect(Me, Nothing)
' Verbindung zählen beim Öffnen
AddHandler oChannel.Opened, Sub()
Dim oCount = Interlocked.Increment(_ActiveConnections)
Logger.Debug("Channel opened. Active connections: [{0}]", oCount)
End Sub
' Verbindung abziehen beim Schließen oder Fehler
AddHandler oChannel.Closed, Sub()
Dim oCount = Interlocked.Decrement(_ActiveConnections)
Logger.Debug("Channel closed. Active connections: [{0}]", oCount)
End Sub
AddHandler oChannel.Faulted, Sub()
Dim oCount = Interlocked.Decrement(_ActiveConnections)
Logger.Warn("Channel faulted. Active connections: [{0}]", oCount)
RaiseEvent Reconnect(Me, Nothing)
End Sub
Logger.Debug("Channel created. State=[{0}]", oChannel.State)
Return oChannel
Catch ex As Exception
Logger.Error(ex)
Throw ex
Throw
End Try
End Function
Private Function GetChannelFactory(pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel)
Dim oBinding = GetBinding()
Dim oAddress = New EndpointAddress($"net.tcp://{pServerAddress.Host}:{pServerAddress.Port}/DigitalData/Services/Main")
Logger.Debug("Creating ChannelFactory with Binding: SendTimeout=[{0}], ReceiveTimeout=[{1}], MaxConnections=[{2}], MaxBufferSize=[{3}], TransferMode=[{4}]",
oBinding.SendTimeout,
oBinding.ReceiveTimeout,
oBinding.MaxConnections,
oBinding.MaxBufferSize,
oBinding.TransferMode)
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
Return oFactory
End Function
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.Database
Imports System.Data.SqlClient
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
@@ -78,7 +79,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetDatatableECMAsync(pSQL As String) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableECM(pSQL))
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0)
End Function
Public Function GetDatatableIDB(pSQL As String) As DataTable
@@ -86,7 +87,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetDatatableIDBAsync(pSQL As String) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableIDB(pSQL))
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0)
End Function
Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable
@@ -94,7 +95,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetDatatableWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableWithConnection(pSQL, pConnectionId))
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId)
End Function
#End Region
@@ -104,7 +105,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetScalarValueECMAsync(pSQL As String) As Task(Of Object)
Return Await Task.Run(Function() GetScalarValueECM(pSQL))
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0)
End Function
Public Function GetScalarValueIDB(pSQL As String) As Object
@@ -112,7 +113,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetScalarValueIDBAsync(pSQL As String) As Task(Of Object)
Return Await Task.Run(Function() GetScalarValueIDB(pSQL))
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0)
End Function
Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object
@@ -120,7 +121,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function GetScalarValueWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Object)
Return Await Task.Run(Function() GetScalarValueWithConnection(pSQL, pConnectionId))
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId)
End Function
#End Region
@@ -130,7 +131,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function ExecuteNonQueryECMAsync(pSQL As String) As Task(Of Boolean)
Return Await Task.Run(Function() ExecuteNonQueryECM(pSQL))
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0)
End Function
Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean
@@ -138,7 +139,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function ExecuteNonQueryIDBAsync(pSQL As String) As Task(Of Boolean)
Return Await Task.Run(Function() ExecuteNonQueryIDB(pSQL))
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0)
End Function
Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean
@@ -146,7 +147,7 @@ Public Class DatabaseWithFallback
End Function
Public Async Function ExecuteNonQueryWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Boolean)
Return Await Task.Run(Function() ExecuteNonQueryWithConnection(pSQL, pConnectionId))
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId)
End Function
#End Region
@@ -187,33 +188,34 @@ Public Class DatabaseWithFallback
Try
Dim oResult As DataTable = Nothing
Dim oTableResult As TableResult = Nothing
_Logger.Debug("GetDatatable: Fetching datatable [{0}] , Filter Expression [{1}], Sort By Column [{2}], Force Fallback [{3}]",
pDataTableName, pFilterExpression, pSortByColumn, pForceFallback)
' If there is no client, we assume there is no service (configured)
If _Client Is Nothing Then
_Logger.Debug("Client is empty, falling back to direct database access.")
_Logger.Debug("GetDatatable: Client is empty, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If
' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
_Logger.Debug("ForceFallback is True, falling back to direct database access.")
_Logger.Debug("GetDatatable: ForceFallback is True, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If
' If the table is not cached, we try going through the service
If Not IsTableCached(pDataTableName) Then
_Logger.Debug("Datatable is not chached, fetching data from service.")
_Logger.Debug("GetDatatable: Datatable [{0}] is not chached, fetching data from service.", pDataTableName)
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If
' If there is a proper ConnectionId, we try going through the service
If pConnectionId > 0 Then
_Logger.Debug("ConnectionId is set, fetching data from service.")
_Logger.Debug("GetDatatable: ConnectionId is set, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If
Try
_Logger.Debug("Datatable is chached, fetching data from cache.")
_Logger.Debug("GetDatatable: Datatable is chached, fetching data from cache.")
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
Catch ex As Exception
_Logger.Error(ex)
@@ -221,9 +223,10 @@ Public Class DatabaseWithFallback
End Try
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
_Logger.Warn("⚠ GetDatatable: Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
Else
_Logger.Debug("✔ GetDatatable: Datatable [{0}] fetched from AppServer Cache.", pDataTableName)
Return oTableResult.Table
End If
@@ -276,11 +279,13 @@ Public Class DatabaseWithFallback
' If there is no client, we assume there is no service (configured)
If _Client Is Nothing Then
_Logger.Debug("ExecuteNonQuery - Client is empty, falling back to direct database access.")
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If
' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
_Logger.Debug("ExecuteNonQuery - ForceFallback is set, falling back to direct database access.")
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If
@@ -294,7 +299,9 @@ Public Class DatabaseWithFallback
End Function
Private Function IsTableCached(pName As String) As Boolean
_Logger.Debug("IsTableCached: Checking if table [{0}] is cached.", pName)
If _Client Is Nothing Then
_Logger.Warn("⚠ IsTableCached: Client is nothing, cannot check if table is cached.")
Return False
End If
@@ -303,42 +310,74 @@ Public Class DatabaseWithFallback
Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
Try
_Logger.Debug("GetDatatableFromService: Fetching data from service [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Dim oResult As GetDatatableResponse = Nothing
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = _Client.GetDatatableFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = _Client.GetDatatableFromIDB(pSQLCommand)
Case Else
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select
If oResult Is Nothing Then
Throw New ApplicationException("Unexpected server error ocurred!")
End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetDatatableFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Table
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetDatatableFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("GetDatatableFromService failed. Falling back to direct database access.")
_Logger.Warn("⚠ GetDatatableFromService failed. Falling back to direct database access.")
_Logger.Error(ex)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Try
End Function
Private Async Function GetDatatableFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of DataTable)
Dim oFallback As Boolean = False
_Logger.Debug("GetDatatableFromServiceAsync: GetDatatableFromServiceAsync called with SQL [{0}], DatabaseType [{1}], ConnectionId [{2}]", pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
Return Await Task.Run(Function() GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Dim oResult As GetDatatableResponse = Nothing
Try
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.GetDatatableFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.GetDatatableFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.GetDatatableFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetDatatableFromServiceAsync failed. Falling back to direct database access.")
oFallback = True
End If
Catch ex As Exception
_Logger.Warn("⚠ GetDatatableFromServiceAsync failed. Falling back to direct database access.")
_Logger.Error(ex)
oFallback = True
End Try
If oFallback Then
Return Await Task.Run(Function() GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Return oResult.Table
End Function
Private Function GetDatatableFromDatabase(pSQLCommand As String, pDatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
Try
_Logger.Debug("Fetching data from database [{0}] with Connection Id [{0}]", pDatabaseType.ToString, pConnectionId)
_Logger.Debug("GetDatatableFromDatabase: Fetching data from database [{0}] with Connection Id [{1}] and Command [{2}]", pDatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case pDatabaseType
Case Constants.DatabaseType.IDB
@@ -361,35 +400,68 @@ Public Class DatabaseWithFallback
End Try
End Function
Private Async Function GetScalarValueFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of Object)
Dim oFallback As Boolean = False
_Logger.Debug("GetScalarValueFromServiceAsync called with SQL [{0}], DatabaseType [{1}], ConnectionId [{2}]", pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
Return Await Task.Run(Function() GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Dim oResult As GetScalarValueResponse = Nothing
Try
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.GetScalarValueFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.GetScalarValueFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.GetScalarValueFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetScalarValueFromServiceAsync failed. Falling back to direct database access.")
oFallback = True
End If
Catch ex As Exception
_Logger.Warn("⚠ GetScalarValueFromServiceAsync failed. Falling back to direct database access.")
_Logger.Error(ex)
oFallback = True
End Try
If oFallback Then
Return Await Task.Run(Function() GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Return oResult.Scalar
End Function
Private Function GetScalarValueFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
Try
Dim oResult As GetScalarValueResponse = Nothing
_Logger.Debug("GetScalarValueFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = _Client.GetScalarValueFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = _Client.GetScalarValueFromIDB(pSQLCommand)
Case Else
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select
If oResult Is Nothing Then
Throw New ApplicationException("Unexpected server error ocurred!")
End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetScalarValueFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Scalar
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetScalarValueFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("GetScalarValueFromService failed. Falling back to direct database access.")
_Logger.Warn("⚠ GetScalarValueFromService failed. Falling back to direct database access.")
_Logger.Error(ex)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
@@ -399,6 +471,7 @@ Public Class DatabaseWithFallback
Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
Try
_Logger.Debug("DBwFF GetScalarValueFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType
Case Constants.DatabaseType.IDB
Return _DatabaseIDB.GetScalarValue(pSQLCommand)
@@ -419,35 +492,68 @@ Public Class DatabaseWithFallback
End Try
End Function
Private Async Function ExecuteNonQueryFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of Boolean)
Dim oFallback As Boolean = False
_Logger.Debug("ExecuteNonQueryFromServiceAsync called with SQL [{0}], DatabaseType [{1}], ConnectionId [{2}]", pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
Return Await Task.Run(Function() ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Dim oResult As ExecuteNonQueryResponse = Nothing
Try
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.ExecuteNonQueryFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.ExecuteNonQueryFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.ExecuteNonQueryFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ ExecuteNonQueryFromServiceAsync failed. Falling back to direct database access.")
oFallback = True
End If
Catch ex As Exception
_Logger.Warn("⚠ ExecuteNonQueryFromServiceAsync failed. Falling back to direct database access.")
_Logger.Error(ex)
oFallback = True
End Try
If oFallback Then
Return Await Task.Run(Function() ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId))
End If
Return oResult.Result
End Function
Private Function ExecuteNonQueryFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
Try
Dim oResult As ExecuteNonQueryResponse = Nothing
_Logger.Debug("ExecuteNonQueryFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand)
Case Else
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select
If oResult Is Nothing Then
Throw New ApplicationException("Unexpected server error ocurred!")
End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ ExecuteNonQueryFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Result
Catch ex As InvalidOperationException
_Logger.Warn("⚠ ExecuteNonQueryFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("ExecuteNonQueryFromService failed. Falling back to direct database access.")
_Logger.Warn("⚠ ExecuteNonQueryFromService failed. Falling back to direct database access.")
_Logger.Error(ex)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
@@ -456,6 +562,8 @@ Public Class DatabaseWithFallback
Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
Try
_Logger.Debug("ExecuteNonQueryFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType
Case Constants.DatabaseType.IDB
Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand)

View File

@@ -311,6 +311,9 @@
<LastGenOutput>Reference.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="ErrorLog.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>

333
EDMIAPI/ErrorLog.txt Normal file
View File

@@ -0,0 +1,333 @@
08:17:13.7755|DatabaseWithFallback|ERROR >> System.ServiceModel.EndpointNotFoundException: Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0060461 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0060461 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000. bei DigitalData.Modules.EDMI.API.Client.HandleCommunicationError(Exception ex, String callerName)
bei DigitalData.Modules.EDMI.API.Client.VB$StateMachine_58_GetDatatableFromECMAsync.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.VB$StateMachine_35_GetDatatableFromServiceAsync.MoveNext()
Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000 bei System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
bei System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
bei System.ServiceModel.Channels.SocketConnectionInitiator.ConnectAsyncResult.OnConnect(IAsyncResult result)
08:21:27.1457|Client|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während des Wartens auf eine Antwort nach 00:00:06.6057132 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während des Wartens auf eine Antwort nach 00:00:06.6057132 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnDatatableFromCache(String Name, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
Zeitüberschreitung bei der Socketübertragung nach 00:00:06.6050000. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.SingletonConnectionReader.Receive(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.WaitForReply(TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Fehler bei Lesevorgang, siehe interne Ausnahme. bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:06.6050000. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
08:21:27.1457|DatabaseWithFallback|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während des Wartens auf eine Antwort nach 00:00:06.6057132 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während des Wartens auf eine Antwort nach 00:00:06.6057132 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnDatatableFromCache(String Name, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
Zeitüberschreitung bei der Socketübertragung nach 00:00:06.6050000. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.SingletonConnectionReader.Receive(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.WaitForReply(TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Fehler bei Lesevorgang, siehe interne Ausnahme. bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:06.6050000. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
08:21:31.2008|Client|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnScalarValue(GetScalarValueRequest pData)
bei DigitalData.Modules.EDMI.API.Client.GetScalarValueFromECM(String pSQL)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:10.6514301. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.TimeoutConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.StreamFramer.ReadMessage()
bei System.Net.Security.NegoState.StartReceiveBlob(LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
bei System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
bei System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
bei System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:21:31.2068|DatabaseWithFallback|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnScalarValue(GetScalarValueRequest pData)
bei DigitalData.Modules.EDMI.API.Client.GetScalarValueFromECM(String pSQL)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetScalarValueFromService(String pSQLCommand, DatabaseType DatabaseType, Int32 pConnectionId)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:10.6514301. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.TimeoutConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
bei System.Net.StreamFramer.ReadMessage()
bei System.Net.Security.NegoState.StartReceiveBlob(LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
bei System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
bei System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
bei System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
bei System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:21:57.3155|Client|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnScalarValue(GetScalarValueRequest pData)
bei DigitalData.Modules.EDMI.API.Client.GetScalarValueFromECM(String pSQL)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:29.9989994. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:21:57.3165|DatabaseWithFallback|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnScalarValue(GetScalarValueRequest pData)
bei DigitalData.Modules.EDMI.API.Client.GetScalarValueFromECM(String pSQL)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetScalarValueFromService(String pSQLCommand, DatabaseType DatabaseType, Int32 pConnectionId)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:29.9989994. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:21:58.9285|DatabaseWithFallback|ERROR >> System.ServiceModel.EndpointNotFoundException: Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0050242 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0050242 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Server stack trace:
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei DigitalData.Modules.EDMI.API.Client.HandleCommunicationError(Exception ex, String callerName)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000 bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
08:21:58.9595|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:21:58.9595|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:21:59.1305|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:21:59.1915|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:21:59.2075|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:22:02.2282|Client|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnDatatableFromCache(String Name, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:29.9990010. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:22:02.2282|DatabaseWithFallback|ERROR >> System.TimeoutException: Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Beim Anforderungskanal ist während eines Sendeversuch nach 00:00:30 eine Zeitüberschreitung aufgetreten. Erhöhen Sie den an den Aufruf übergebenen Zeitlimitwert auf "Request", oder erhöhen Sie den SendTimeout-Wert für die Bindung. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts.
Server stack trace:
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
bei DigitalData.Modules.EDMI.API.EDMIServiceReference.IEDMIService.ReturnDatatableFromCache(String Name, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
Der Anforderungsvorgang wurde nicht innerhalb des zugewiesenen Zeitlimits von 00:00:30 abgeschlossen. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
Zeitüberschreitung bei der Socketübertragung nach 00:00:29.9990010. Das für die Bindung festgelegte Zeitlimit wurde überschritten. Der für diesen Vorgang zugewiesene Zeitraum war möglicherweise ein Teil eines längeren Timeouts. bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
08:22:03.2452|DatabaseWithFallback|ERROR >> System.ServiceModel.EndpointNotFoundException: Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0020254 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0020254 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Server stack trace:
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei DigitalData.Modules.EDMI.API.Client.HandleCommunicationError(Exception ex, String callerName)
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000 bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
08:22:03.2552|DatabaseWithFallback|ERROR >> System.InvalidOperationException: Client is offline.
Client is offline. bei DigitalData.Modules.EDMI.API.Client.EnsureAvailable()
bei DigitalData.Modules.EDMI.API.Client.GetDatatableByName(String DatatableName, String FilterExpression, String SortByColumn)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.GetDatatable(String pDataTableName, String pFallbackSQL, DatabaseType pFallbackType, String pFilterExpression, String pSortByColumn, Boolean pForceFallback, Int32 pConnectionId)
08:22:13.3959|DatabaseWithFallback|ERROR >> System.ServiceModel.EndpointNotFoundException: Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0040254 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Es konnte keine Verbindung mit "net.tcp://10.1.2.152:9000/DigitalData/Services/Main" hergestellt werden. Der Verbindungsversuch hat für einen Zeitraum von 00:00:01.0040254 angedauert. TCP-Fehlercode 10061: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000.
Server stack trace:
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
bei System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei DigitalData.Modules.EDMI.API.Client.HandleCommunicationError(Exception ex, String callerName)
bei DigitalData.Modules.EDMI.API.Client.ExecuteNonQueryFromIDB(String pSQL)
bei DigitalData.Modules.EDMI.API.DatabaseWithFallback.ExecuteNonQueryFromService(String pSQLCommand, DatabaseType DatabaseType, Int32 pConnectionId)
Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 10.1.2.152:9000 bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
bei System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)

View File

@@ -25,7 +25,7 @@ Namespace Modules.IDB
Return True
End If
Logger.Warn("Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage)
Logger.Warn("⚠ Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage)
Return False
Catch ex As Exception

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("EDMIAPI")>
<Assembly: AssemblyCopyright("Copyright © 2026")>
<Assembly: AssemblyTrademark("2.0.0")>
<Assembly: AssemblyTrademark("2.7.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyVersion("2.7.0.0")>
<Assembly: AssemblyFileVersion("1.6.1.1")>

View File

@@ -265,6 +265,7 @@
<Compile Include="GrapQLInterface\LoginData.vb" />
<Compile Include="GrapQLInterface\LogoutData.vb" />
<Compile Include="GrapQLInterface\QueryData.vb" />
<Compile Include="ZUGFeRDInterface\ebInterface6.1\InvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Enums\ErrorCodes.vb" />
<Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" />
<Compile Include="ZUGFeRDInterface\Exceptions.vb" />

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Interfaces")>
<Assembly: AssemblyCopyright("Copyright © 2026")>
<Assembly: AssemblyTrademark("2.4.6.0")>
<Assembly: AssemblyTrademark("2.5.0.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.6.0")>
<Assembly: AssemblyFileVersion("2.4.6.0")>
<Assembly: AssemblyVersion("2.5.0.0")>
<Assembly: AssemblyFileVersion("2.5.0.0")>

View File

@@ -3,6 +3,7 @@ Imports System.Xml
Imports System.Xml.Serialization
Imports DigitalData.Modules.Interfaces.Exceptions
Imports DigitalData.Modules.Interfaces.PDFEmbeds
Imports DigitalData.Modules.Interfaces.PropertyValues
Imports DigitalData.Modules.Interfaces.ZUGFeRD
Imports DigitalData.Modules.Logging
Imports GdPicture14
@@ -21,8 +22,6 @@ Public Class ZUGFeRDInterface
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x"
Public Const UBL_SPEC_21 = "UBL_21"
Public Const XMLSCHEMA_ZUGFERD_10 = "Version1_0"
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1"
@@ -31,9 +30,14 @@ Public Class ZUGFeRDInterface
Public Const XMLSCHEMA_ZUGFERD_233 = "Version2_3_3_FacturX"
Public Const XMLSCHEMA_ZUGFERD_24 = "Version2_4_FacturX"
Public Const XMLSCHEMA_ZUGFERD_25 = "Version2_5_FacturX"
Public Const UBL_SPEC_21 = "UBL_21"
Public Const XMLSCHEMA_UBL_21_INVOICE = "UBL2_1_INVOICE"
Public Const XMLSCHEMA_UBL_21_CREDITNOTE = "UBL2_1_CREDITNOTE"
Public Const EBINTERFACE_SPEC_61 = "EBINTERFACE_61"
Public Const XMLSCHEMA_EBINTERFACE_61 = "Version6_1"
Public Const RECEIPT_TYPE_XML = "XML"
Public Const RECEIPT_TYPE_PDF = "PDF"
@@ -67,6 +71,7 @@ Public Class ZUGFeRDInterface
Public Property AllowZugferd_2_x_Schema As Boolean = True
Public Property AllowZugferd_2_3_x_Schema As Boolean = True
Public Property AllowPeppol_3_x_Schema As Boolean = False
Public Property AllowEBInterface_Schema As Boolean = False
End Class
Public Class ZugferdResult
@@ -152,6 +157,20 @@ Public Class ZUGFeRDInterface
Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception
_logger.Error(ex)
End Try
ElseIf pSpecification = EBINTERFACE_SPEC_61 Then
Try
' root-Elemente werden hier herausgefiltert
Dim countElements As Integer = pPropertyMapList.Where(Function(x) x.Specification = pSpecification And Not x.XMLPath.StartsWith("root.")).Count
_logger.Debug("Property map list contains [{0}] elements for specification [{1}]", countElements, pSpecification)
Return pPropertyMapList.
Where(Function(kv) kv.Specification = pSpecification And Not kv.XMLPath.StartsWith("root.")).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception
_logger.Error(ex)
End Try
@@ -174,6 +193,27 @@ Public Class ZUGFeRDInterface
Return Nothing
End Function
Public Function FilterRootPropertyMap(pPropertyMapList As List(Of XmlItemProperty), pSpecification As String) As Dictionary(Of String, XmlItemProperty)
' Aktuell verwendet nur ebeInterafce attribute im root-Knoten
If pSpecification = EBINTERFACE_SPEC_61 Then
Try
' root-Elemente werden hier herausgefiltert
Dim countElements As Integer = pPropertyMapList.Where(Function(x) x.Specification = pSpecification And x.XMLPath.StartsWith("root.")).Count
_logger.Debug("Property map list contains [{0}] root attribute elements for specification [{1}]", countElements, pSpecification)
Return pPropertyMapList.
Where(Function(kv) kv.Specification = pSpecification And kv.XMLPath.StartsWith("root.")).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception
_logger.Error(ex)
End Try
End If
Return Nothing
End Function
Public Function GetSerializedXMLContentFromFile(oFileInfo As FileInfo) As ZugferdResult
Dim oResult = New ZugferdResult()
Dim oMessage As String = String.Empty
@@ -455,6 +495,16 @@ Public Class ZUGFeRDInterface
})
End If
If _Options.AllowEBInterface_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(EBINTERFACE_61.InvoiceType),
.Specification = EBINTERFACE_SPEC_61,
.XMLSchema = XMLSCHEMA_EBINTERFACE_61
}
})
End If
For Each oType In oAllowedTypes
Dim oTypeName As String = oType.SchemaType.FullName
Dim oSerializer As New XmlSerializer(oType.SchemaType)
@@ -497,4 +547,5 @@ Public Class ZUGFeRDInterface
Throw New ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, oMessage)
End Try
End Function
End Class

View File

@@ -1,8 +1,8 @@
Public Enum Item_Types
StringType '0
DateType '1
MoneyType '2
FileType '3
ListType '4 - vgl. Währung
StringType = 0 '0
DateType = 1 '1
MoneyType = 2 '2
FileType = 3 '3
ListType = 4 '4 - vgl. Währung
End Enum

View File

@@ -1,7 +1,10 @@
Imports System.Globalization
Imports System.Reflection
Imports System.Text.RegularExpressions
Imports System.Xml
Imports DigitalData.Modules.Logging
Imports GdPicture.Internal.MSOfficeBinary.translator.Spreadsheet.XlsFileFormat.Records
Imports GdPicture.Internal.MSOfficeBinary.translator.Tools
Public Class PropertyValues
Private _logger As Logger
@@ -122,12 +125,13 @@ Public Class PropertyValues
' Returns nothing if oColumn.Value contains an empty list
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
_logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn)
If oTableColumn = "INVOICE_SELLER_EMAIL" Then
Console.WriteLine("INVOICE_SELLER_EMAIL")
ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then
Console.WriteLine("INVOICE_POSITION_ARTICLE")
End If
'_logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn)
'If oTableColumn = "INVOICE_SELLER_EMAIL" Then
' Console.WriteLine("INVOICE_SELLER_EMAIL")
'ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then
' Console.WriteLine("INVOICE_POSITION_ARTICLE")
'End If
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oColumn.Key.IsRequired Then
_logger.Warn($"{MessageId} - oPropertyValue for column [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
@@ -154,7 +158,11 @@ Public Class PropertyValues
End If
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = 4 Then
If oItemType = Item_Types.MoneyType Then
oPropertyValue = GetFormattedDecimalValue(oPropertyValue)
End If
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = Item_Types.ListType Then
Dim oValuestring = oPropertyValue.ToString()
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
@@ -218,9 +226,15 @@ Public Class PropertyValues
' This should hopefully show config errors
If TypeOf oPropertyValue Is List(Of Object) Then
_logger.Warn("Item with specification [{0}] may be configured incorrectly", oTableColumn)
_logger.Warn("Item [{0}] may be configured incorrectly", oTableColumn)
oPropertyValue = Nothing
End If
If IsComplexeObject(oPropertyValue) = True Then
_logger.Debug("Item Value [{0}] is complexe. cant be used.", oTableColumn)
oPropertyValue = Nothing
End If
End Select
End If
Catch ex As Exception
@@ -247,8 +261,12 @@ Public Class PropertyValues
End If
End If
If oItemType = Item_Types.MoneyType Then
oPropertyValue = GetFormattedDecimalValue(oPropertyValue)
End If
' Statt dem Zahlenwert des Enums, wollen wir die Währungsbezeichnung
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = 4 Then
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = Item_Types.ListType Then
Dim oValuestring = oPropertyValue.ToString()
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
@@ -275,6 +293,167 @@ Public Class PropertyValues
Return oResult
End Function
Private Function GetFormattedDecimalValue(pPropertyValue As Object) As Object
' wir versuchen den gefundenen Wert in einen decimal mit 2 Nachommastellen umzuwandeln
' Eingaben können mit . oder mit , als Dezimal-Trenner kommen: 19.00 = 19,00
If IsNothing(pPropertyValue) OrElse String.IsNullOrEmpty(pPropertyValue) Then
Return String.Empty
End If
Try
Dim stringValue = pPropertyValue.ToString()
Dim deCulture As New CultureInfo("de-DE")
Dim usCulture As New CultureInfo("en-US")
Dim decimalValue As Decimal
If stringValue.Contains(".") AndAlso Not stringValue.Contains(",") Then
' Wir wandeln mit en-US um
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, usCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
ElseIf stringValue.Contains(",") AndAlso Not stringValue.Contains(".") Then
' Wir wandeln mit de-DE um, wenn Komma als Trennzeichen enthalten ist
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, deCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
ElseIf Not stringValue.Contains(",") AndAlso Not stringValue.Contains(".") Then
' Wir wandeln mit en-US um, wenn KEIN Trennzeichen enthalten ist
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, usCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
End If
Return pPropertyValue
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
Public Function CheckRootAttributeValues(pDocument As Object, pPropertyMap As Dictionary(Of String, XmlItemProperty), pMessageId As String, pCheckResult As CheckPropertyValuesResult) As CheckPropertyValuesResult
If pPropertyMap Is Nothing Then
Return pCheckResult
End If
' PropertyMap items with `IsGrouped = False` are handled normally
Dim oRootAttributeProperties As Dictionary(Of String, XmlItemProperty) = pPropertyMap.
ToDictionary(Function(Item) Item.Key,
Function(Item) Item.Value)
For Each oItem As KeyValuePair(Of String, XmlItemProperty) In oRootAttributeProperties
Dim oTableColumn As String = oItem.Value.TableColumn
Dim oPropertyDescription As String = oItem.Value.Description
Dim oPropertyPath As String = oItem.Value.XMLPath
Dim oPropertyValue As Object = Nothing
Dim oTableName = oItem.Value.TableName
Dim oIsRequired = oItem.Value.IsRequired
Dim oDescription = oItem.Value.Description
Dim oItemType = oItem.Value.ItemType
Dim oEN16931_ID = oItem.Value.EN16931_ID
Try
oPropertyValue = GetRootAttributeValue(pDocument, oItem.Key)
Catch ex As Exception
_logger.Error(ex)
oPropertyValue = Nothing
End Try
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oItem.Value.IsRequired Then
_logger.Warn("Column [{0}] is empty, but marked as required! Adding MissingProperty.", oTableColumn)
Dim oMissingProperty = New MissingProperty With
{
.EN16931_ID = oEN16931_ID,
.Description = oPropertyDescription,
.XMLPath = oPropertyPath
}
pCheckResult.MissingProperties.Add(oMissingProperty)
Continue For
Else
_logger.Debug("oPropertyValue for Column [{0}] is empty or not found. Skipping.", oTableColumn)
Continue For
End If
End If
If pDocument.Specification = "EBINTERFACE_61" Then
' ebInterface DocumentType in UNTDID 1001 — Document type
If oTableColumn = "INVOICE_TYPE" Then
oPropertyValue = GetUNTDID1001_DocumentType(oPropertyValue)
_logger.Debug("oPropertyValue for Column [{0}] in EBINTERFACE_61 with value [{1}] ", oTableColumn, oPropertyValue)
End If
End If
pCheckResult.ValidProperties.Add(New ValidProperty() With {
.MessageId = pMessageId,
.Description = oPropertyDescription,
.Value = oPropertyValue,
.GroupCounter = 0,
.TableName = oTableName,
.TableColumn = oTableColumn,
.IsRequired = oIsRequired,
.XMLPath = oPropertyPath,
.ItemType = oItemType,
.EN16931_ID = oEN16931_ID
})
Next
Return pCheckResult
End Function
Private Function GetUNTDID1001_DocumentType(oPropertyValue As String) As String
Select Case oPropertyValue
Case "CreditMemo"
Return 381 ' Credit note
Case "FinalSettlement"
Return 877 ' Final construction invoice
Case "Invoice"
Return 380 ' Commercial invoice
Case "InvoiceForAdvancePayment"
Return 386 ' Prepayment invoice
Case "InvoiceForPartialDelivery"
Return 381 ' Partial invoice
Case "SelfBilling"
Return 261 ' Self billed credit note
Case "SubsequentCredit"
Return 83 ' Credit note related to financial adjustments
Case "SubsequentDebit"
Return 84 ' Debit note related to financial adjustments
Case Else
Return 0
End Select
End Function
Private Function GetRootAttributeValue(pDocument As Object, pXmlPath As String) As String
If pDocument.XElementObject Is Nothing Then
Return Nothing
End If
Try
Dim attributeName As String = pXmlPath.Replace("root.", "")
Dim attributeValue As String = pDocument.XElementObject.Attribute(attributeName).Value
Return attributeValue
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
Public Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object)
Dim oNameParts As String() = PropertyName.Split("."c)
@@ -421,8 +600,21 @@ Public Class PropertyValues
firstElement = oList.FirstOrDefault()
If firstElement IsNot Nothing AndAlso IsArray(firstElement) Then
' Attachments sind Byte-Arrays und müssen umgewandelt werden
Return Convert.ToBase64String(firstElement)
Dim oStr As String
' Array behandeln -> erstes Element nehmen
If TypeOf firstElement Is String() Then
Dim arr As String() = CType(firstElement, String())
oStr = If(arr.Length > 0, arr(0), String.Empty)
Else
oStr = firstElement.ToString()
End If
If IsBase64String(oStr) Then
' Attachments sind Byte-Arrays und müssen umgewandelt werden
Return Convert.ToBase64String(firstElement)
Else
Return oStr
End If
Else
Return DoGetFinalPropValue(oList.First())
@@ -464,4 +656,40 @@ Public Class PropertyValues
Return Regex.IsMatch(Prop, _indexPattern)
End Function
Private Function IsComplexeObject(obj As Object) As Boolean
If obj Is Nothing Then Return False
Dim t As Type = obj.GetType()
' Einfache Typen ausschließen
If t.IsPrimitive OrElse
t.IsEnum OrElse
t Is GetType(String) OrElse
t Is GetType(Decimal) OrElse
t Is GetType(DateTime) Then
Return False
End If
' Wenn es öffentliche Properties hat, ist es "komplex"
Return t.GetProperties().Length > 0 OrElse t.IsClass
End Function
Function IsBase64String(str As String) As Boolean
If String.IsNullOrEmpty(str) Then Return False
' Base64 hat bestimmte Zeichen und meist Länge Vielfaches von 4
If str.Length Mod 4 <> 0 Then Return False
' Regex-Check für gültige Base64-Zeichen
If Not System.Text.RegularExpressions.Regex.IsMatch(str, "^[A-Za-z0-9+/]*={0,2}$") Then
Return False
End If
Try
Dim bytes As Byte() = Convert.FromBase64String(str)
Return True
Catch ex As FormatException
Return False
End Try
End Function
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2026")>
<Assembly: AssemblyTrademark("3.8.1.0")>
<Assembly: AssemblyTrademark("3.9.0.0")>
<Assembly: ComVisible(False)>
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("3.8.1.0")>
<Assembly: AssemblyFileVersion("3.8.1.0")>
<Assembly: AssemblyVersion("3.9.0.0")>
<Assembly: AssemblyFileVersion("3.9.0.0")>

View File

@@ -137,7 +137,11 @@ Namespace ZUGFeRD
, '{pParameter2}'
, 77"
_mssql.ExecuteNonQuery(oExecute, pTransaction)
If pTransaction IsNot Nothing Then
_mssql.ExecuteNonQuery(oExecute, pTransaction)
Else
_mssql.ExecuteNonQuery(oExecute)
End If
Catch ex As Exception
_logger.Error(ex)

View File

@@ -68,6 +68,7 @@ Public Class ImportZUGFeRDFiles
Private ReadOnly _embeds As PDFEmbeds
Private SQL_xRechnung_ItemTemplate As String = ""
Private SQL_ebInterface_CompleteXMLItems As String = ""
Private ReadOnly _gdpictureLicenseKey As String
Private ReadOnly _xRechnungCreator As XRechnungViewDocument
@@ -81,6 +82,8 @@ Public Class ImportZUGFeRDFiles
Public ZugferdFileCount As Integer = 0
Public MD5Checksum As String = Nothing
Public XMLSpecification As String = Nothing
Public XMLSchema As String = Nothing
Public EmailAttachmentFiles As New List(Of FileInfo)
Public EmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile)
@@ -114,22 +117,28 @@ Public Class ImportZUGFeRDFiles
Public Sub Start(Arguments As Object) Implements IJob.Start
Dim oArgs As WorkerArgs = Arguments
Dim oAttachmentExtractor = New PDFEmbeds(_logConfig)
Dim oSpecification As String = String.Empty
_EmailOutAccountId = oArgs.EmailOutProfileId
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
.AllowFacturX_Filename = oArgs.AllowFacturX,
.AllowXRechnung_Filename = oArgs.AllowXRechnung,
.AllowPeppol_3_x_Schema = oArgs.AllowPeppolBISBill3x
.AllowPeppol_3_x_Schema = oArgs.AllowPeppolBISBill3x,
.AllowEBInterface_Schema = oArgs.AllowEBInterface
})
_logger.Debug("Starting Job {0}", [GetType].Name)
If oArgs.AllowXRechnung Then
' TODO - Config-Schalter hat NIX mit XRechnung-Dateien u. Sichtbelegen zu tun, sondern nur mit Dateinamen zu tun.
If oArgs.AllowXRechnung Or oArgs.AllowPeppolBISBill3x Or oArgs.AllowEBInterface Then
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WITH (NOLOCK) WHERE TITLE = 'VWDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE_ITEMS'"
SQL_xRechnung_ItemTemplate = _mssql.GetScalarValue(oSQL)
End If
If oArgs.AllowEBInterface Then
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WITH (NOLOCK) WHERE TITLE = 'EBINTERFACE_COMPLETE_MISSING_XML_ITEMS'"
SQL_ebInterface_CompleteXMLItems = _mssql.GetScalarValue(oSQL)
End If
Try
'For Each oPath As String In oArgs.WatchDirectory
Dim oPath As String = oArgs.WatchDirectory
@@ -208,6 +217,7 @@ Public Class ImportZUGFeRDFiles
Try
For Each oFile In oEInvoiceFileGroup
oSpecification = String.Empty
oFileCounter += 1
Dim oResult As ProcessFileResult
@@ -221,6 +231,7 @@ Public Class ImportZUGFeRDFiles
_logger.Debug("eInvoice File found")
oMD5CheckSum = oResult.MD5Checksum
oZUGFeRDCount = oResult.ZugferdFileCount
oSpecification = oResult.XMLSpecification
oEmailAttachmentFiles.AddRange(oResult.EmailAttachmentFiles)
oEmbeddedAttachmentFiles.AddRange(oResult.EmbeddedAttachmentFiles)
Else ' No zugferd found!
@@ -439,21 +450,34 @@ Public Class ImportZUGFeRDFiles
If oMoveDirectory = DIRECTORY_DONT_MOVE Then
_logger.Info("Application Error occurred. Files for message Id {0} will not be moved.", oMessageId)
ElseIf oArgs.AllowXRechnung And oIsSuccess And
ElseIf (oArgs.AllowXRechnung Or oArgs.AllowPeppolBISBill3x Or oArgs.AllowEBInterface) And oIsSuccess And
oEInvoiceFileGroup.Item(0).Extension.Equals(".xml", StringComparison.OrdinalIgnoreCase) = True Then
_logger.Debug("Before Creating the PDF-File from XML data / Before Commit")
oxRechnungHandle = True
If oSQLTransaction IsNot Nothing Then
' Commit Transaction - muss ausgeführt werden, sonst sind keine Daten in der DB vorhanden
oSQLTransaction.Commit()
_logger.Debug("XML commit triggered")
End If
' Vor der Sichtbeleg-Erzeugung, müssen ggf Daten nachberechnet werden.
' Hier wird die Prozedur für EBINTERFACE_61 aufgerufen, falls der Beleg dieses Schema verwendet
If oArgs.AllowEBInterface AndAlso
String.Equals(oSpecification, "EBINTERFACE_61", StringComparison.InvariantCultureIgnoreCase) AndAlso
Not String.IsNullOrEmpty(SQL_ebInterface_CompleteXMLItems) Then
_logger.Debug("Before Calling ebInterface Procedure")
Dim oSQL_MsgIDReplace_1 As String = SQL_ebInterface_CompleteXMLItems.Replace("@MSG_ID", oFileGroup.Key)
Dim oSqlResult = _mssql.ExecuteNonQuery(oSQL_MsgIDReplace_1)
_logger.Debug("Result of ebInterface Procedure: [{0}]", oSqlResult)
End If
' Hier das neue PDF erzeugen
'but before we need to get all Data we need
MyTemplateValues_xInvDT = Nothing
Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate
oSQL_MsgIDReplace = oSQL_MsgIDReplace.Replace("@MSG_ID", oFileGroup.Key)
If oSQLTransaction IsNot Nothing Then
' Commit Transaction
oSQLTransaction.Commit()
_logger.Debug("XML commit triggered")
End If
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
If Not IsNothing(MyTemplateValues_xInvDT) Then
@@ -597,6 +621,8 @@ Public Class ImportZUGFeRDFiles
If oDocument IsNot Nothing Then
sqlResult = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs, oResult)
oResult.XMLSpecification = oDocument.Specification
oResult.XMLSchema = oDocument.UsedXMLSchema
End If
Catch ex As Exception
@@ -719,6 +745,10 @@ Public Class ImportZUGFeRDFiles
Dim oPropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId)
' root-Attribute falls konfiguriert auslesen, Ergebnis im oCheckResult enthalten
Dim oRootAttributePropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterRootPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
oCheckResult = _zugferd.PropertyValues.CheckRootAttributeValues(pDocument, oRootAttributePropertyMap, pMessageId, oCheckResult)
_logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count)
If oCheckResult.MissingProperties.Count > 0 Then

View File

@@ -33,5 +33,6 @@ Public Class WorkerArgs
Public AllowZugferd2x As Boolean = True
Public AllowZugferd23x As Boolean = True
Public AllowPeppolBISBill3x As Boolean = False
Public AllowEBInterface As Boolean = False
End Class

View File

@@ -895,17 +895,55 @@ Public Class XRechnungViewDocument
End Function
Private Sub RenderLabelValuePair(context As PdfRenderContext, label As String, value As String)
context.PDF.DrawText(fontResName, MARGIN_LEFT, context.YPosition, label)
Dim safeLabel As String = SanitizeForPdf(label)
Dim safeValue As String = SanitizeForPdf(value)
context.PDF.DrawText(fontResName, MARGIN_LEFT, context.YPosition, safeLabel)
If context.CreateTextBox Then
Dim textBoxYPos As Integer = context.YPosition - 3
context.PDF.DrawTextBox(fontResName, COL_VALUE_X, textBoxYPos, 90, YCoo_TextBoxPlus5(textBoxYPos),
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentCenter,
value)
safeValue)
Else
context.PDF.DrawText(fontResName, COL_VALUE_X, context.YPosition, value)
context.PDF.DrawText(fontResName, COL_VALUE_X, context.YPosition, safeValue)
End If
End Sub
''' <summary>
''' Bereinigt einen String vor der Übergabe an GdPicture DrawText.
''' Entfernt Steuerzeichen, Surrogate und Format-/BiDi-Zeichen,
''' die GdPictures UnicodeBidi-Algorithmus zum Absturz bringen.
''' </summary>
Private Function SanitizeForPdf(text As String) As String
If String.IsNullOrEmpty(text) Then Return String.Empty
Dim sb As New System.Text.StringBuilder(text.Length)
Dim removedChars As New System.Text.StringBuilder()
For Each c As Char In text
Dim cat As Globalization.UnicodeCategory = Char.GetUnicodeCategory(c)
Dim isProblematic As Boolean =
cat = Globalization.UnicodeCategory.Control OrElse
cat = Globalization.UnicodeCategory.Surrogate OrElse
cat = Globalization.UnicodeCategory.Format OrElse
cat = Globalization.UnicodeCategory.OtherNotAssigned OrElse
Char.IsHighSurrogate(c) OrElse
Char.IsLowSurrogate(c)
If isProblematic Then
removedChars.Append($"U+{AscW(c):X4}[{cat}] ")
Else
sb.Append(c)
End If
Next
If removedChars.Length > 0 Then
_logger.Warn($"SanitizeForPdf: Removed [{removedChars.ToString().Trim()}] from text [{text.Substring(0, Math.Min(80, text.Length))}]")
End If
Return sb.ToString()
End Function
Private Sub RenderTextWithWrapping(context As PdfRenderContext, text As String)
If text.Length > MAX_TEXT_LENGTH_FULL Then

View File

@@ -510,7 +510,6 @@ Public Class LogConfig
' Add debug rule, if configured
If _EnableDebugLogging = True Then
_config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG)
oLogger.Info("DEBUG Logging is now Enabled.")
Else
oLogger.Debug("DEBUG Logging is now Disabled.")
End If

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
<Assembly: AssemblyProduct("Modules.Logging")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.6.4.0")>
<Assembly: AssemblyTrademark("2.7.0.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.5.0")>
<Assembly: AssemblyFileVersion("2.6.5.0")>
<Assembly: AssemblyVersion("2.7.0.0")>
<Assembly: AssemblyFileVersion("2.7.0.0")>

View File

@@ -247,7 +247,7 @@ Namespace Mail
Try
If pSession.User <> String.Empty Then
Logger.Info("Logging in with user [{0}] and Auth Type [{1}]", pSession.User, pSession.AuthType)
Logger.Debug("Logging in with user [{0}] and Auth Type [{1}]", pSession.User, pSession.AuthType)
If pSession.AuthType = AUTH_OAUTH2 Then
' Use OAuth2 token
@@ -273,10 +273,10 @@ Namespace Mail
Public Function DisconnectFromServer() As Boolean
Try
If Client IsNot Nothing Then
Logger.Debug("Closing connection to Server [{0}].", Session.Server)
Logger.Debug("Closing connection to Server [{0}]...", Session.Server)
DoClose(Client)
Session.Connected = False
Logger.Info("Connection to Server [{0}] closed.", Session.Server)
Logger.Debug("Connection to Server [{0}] closed.", Session.Server)
Else
Logger.Debug("No connection currently open. Exiting.")
End If

View File

@@ -40,6 +40,8 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Database.Test", "Database.T
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMIService", "..\DDMonorepo\Service.EDMIService\EDMIService.vbproj", "{A8C3F298-76AB-4359-AB3C-986E313B4336}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -114,6 +116,10 @@ Global
{991D0231-4623-496D-8BD0-9CA906029CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.Build.0 = Release|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE