Compare commits
29 Commits
484d8de29d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de918b1e88 | ||
|
|
298a398067 | ||
|
|
6aebeaa446 | ||
|
|
ed655879f9 | ||
| e598b6faf5 | |||
| 1ad055d958 | |||
| 953cc10416 | |||
| 1615727352 | |||
|
|
857e1366fe | ||
|
|
d3ebc13eae | ||
| 18e8610edc | |||
| d98e903160 | |||
|
|
3c1b51f519 | ||
|
|
e56be8a6fe | ||
| 1871cca2a6 | |||
| 676b43bbe1 | |||
| 4dc454403b | |||
| 5b83e5d265 | |||
| 1e49d6d955 | |||
|
|
7650fb9455 | ||
|
|
0e13c67887 | ||
| c129b35862 | |||
| 5b0807d4b5 | |||
|
|
0e31f5c8e3 | ||
|
|
36c3a055e3 | ||
|
|
20097e2d24 | ||
|
|
a40af2f977 | ||
| f7377a9ef3 | |||
| 819db67d39 |
@@ -235,13 +235,11 @@ Public Class ConfigManager(Of T)
|
|||||||
Try
|
Try
|
||||||
Dim oAppConfig = ReadFromFile(_AppConfigPath)
|
Dim oAppConfig = ReadFromFile(_AppConfigPath)
|
||||||
CopyValues(oAppConfig, Config)
|
CopyValues(oAppConfig, Config)
|
||||||
|
|
||||||
_Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath)
|
_Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_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
|
End Try
|
||||||
|
|
||||||
_WriteAllValuesToUserConfig = False
|
_WriteAllValuesToUserConfig = False
|
||||||
Else
|
Else
|
||||||
_Logger.Debug("ApplicationConfig does not exist.")
|
_Logger.Debug("ApplicationConfig does not exist.")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
|
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
|
||||||
<Assembly: AssemblyProduct("Modules.Config")>
|
<Assembly: AssemblyProduct("Modules.Config")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
||||||
<Assembly: AssemblyTrademark("1.4.0.0")>
|
<Assembly: AssemblyTrademark("1.5.0.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.4.0.0")>
|
<Assembly: AssemblyVersion("1.5.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.4.0.0")>
|
<Assembly: AssemblyFileVersion("1.5.0.0")>
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ Public Class MSSQLServer
|
|||||||
|
|
||||||
Return pConnection
|
Return pConnection
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
Logger.Error("Error while opening Connection!")
|
Logger.Error("Error while opening Connection!")
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|
||||||
@@ -493,14 +494,30 @@ Public Class MSSQLServer
|
|||||||
pSqlCommandObject.Connection = pSqlConnection
|
pSqlCommandObject.Connection = pSqlConnection
|
||||||
pSqlCommandObject.Transaction = oTransaction
|
pSqlCommandObject.Transaction = oTransaction
|
||||||
pSqlCommandObject.CommandTimeout = pTimeout
|
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()
|
pSqlCommandObject.ExecuteNonQuery()
|
||||||
|
|
||||||
Return True
|
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
|
Catch ex As Exception
|
||||||
Dim omsg = $"Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{pSqlCommandObject.CommandText}]"
|
Logger.Warn("Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{0}]", pSqlCommandObject.CommandText)
|
||||||
Logger.Warn(omsg)
|
Logger.Warn("Parameters: [{0}]", GetParameterListAsString(pSqlCommandObject))
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
MaybeCommitTransaction(oTransaction, pTransactionMode)
|
MaybeCommitTransaction(oTransaction, pTransactionMode)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("Modules.Database")>
|
<Assembly: AssemblyProduct("Modules.Database")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||||
<Assembly: AssemblyTrademark("2.3.7.0")>
|
<Assembly: AssemblyTrademark("2.4.0.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.3.7.0")>
|
<Assembly: AssemblyVersion("2.4.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.3.7.0")>
|
<Assembly: AssemblyFileVersion("2.4.0.0")>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
Imports System.ServiceModel
|
Imports System.ServiceModel
|
||||||
|
Imports System.Threading
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||||
@@ -10,13 +11,26 @@ Public Class Channel
|
|||||||
Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||||
|
|
||||||
Public Event Reconnect As EventHandler
|
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
|
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
|
||||||
Return New NetTcpBinding() With {
|
Return New NetTcpBinding() With {
|
||||||
.MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE,
|
.MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE,
|
||||||
.MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE,
|
.MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE,
|
||||||
.MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE,
|
.MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE,
|
||||||
|
.ListenBacklog = Constants.ChannelSettings.MAX_CONNECTIONS,
|
||||||
|
.MaxConnections = Constants.ChannelSettings.MAX_CONNECTIONS,
|
||||||
.TransferMode = TransferMode.Streamed,
|
.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 {
|
.Security = New NetTcpSecurity() With {
|
||||||
.Mode = SecurityMode.Transport,
|
.Mode = SecurityMode.Transport,
|
||||||
.Transport = New TcpTransportSecurity() With {
|
.Transport = New TcpTransportSecurity() With {
|
||||||
@@ -34,7 +48,28 @@ Public Class Channel
|
|||||||
MyBase.New(pLogConfig)
|
MyBase.New(pLogConfig)
|
||||||
ChannelFactory = GetChannelFactory(pServerAddress)
|
ChannelFactory = GetChannelFactory(pServerAddress)
|
||||||
End Sub
|
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>
|
''' <summary>
|
||||||
''' Creates a channel and adds a Faulted-Handler
|
''' Creates a channel and adds a Faulted-Handler
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -44,21 +79,45 @@ Public Class Channel
|
|||||||
Logger.Debug("Creating channel.")
|
Logger.Debug("Creating channel.")
|
||||||
Dim oChannel = ChannelFactory.CreateChannel()
|
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
|
Return oChannel
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
Throw ex
|
Throw
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetChannelFactory(pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel)
|
Private Function GetChannelFactory(pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel)
|
||||||
Dim oBinding = GetBinding()
|
Dim oBinding = GetBinding()
|
||||||
Dim oAddress = New EndpointAddress($"net.tcp://{pServerAddress.Host}:{pServerAddress.Port}/DigitalData/Services/Main")
|
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)
|
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||||
Return oFactory
|
Return oFactory
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
Imports DigitalData.Modules.EDMI.API.Constants
|
Imports DigitalData.Modules.EDMI.API.Constants
|
||||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||||
@@ -78,7 +79,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetDatatableECMAsync(pSQL As String) As Task(Of DataTable)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function GetDatatableIDB(pSQL As String) As DataTable
|
Public Function GetDatatableIDB(pSQL As String) As DataTable
|
||||||
@@ -86,7 +87,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetDatatableIDBAsync(pSQL As String) As Task(Of DataTable)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable
|
Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable
|
||||||
@@ -94,7 +95,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetDatatableWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of DataTable)
|
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 Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetScalarValueECMAsync(pSQL As String) As Task(Of Object)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function GetScalarValueIDB(pSQL As String) As Object
|
Public Function GetScalarValueIDB(pSQL As String) As Object
|
||||||
@@ -112,7 +113,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetScalarValueIDBAsync(pSQL As String) As Task(Of Object)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object
|
Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object
|
||||||
@@ -120,7 +121,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function GetScalarValueWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Object)
|
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 Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -130,7 +131,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function ExecuteNonQueryECMAsync(pSQL As String) As Task(Of Boolean)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean
|
Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean
|
||||||
@@ -138,7 +139,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function ExecuteNonQueryIDBAsync(pSQL As String) As Task(Of Boolean)
|
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
|
End Function
|
||||||
|
|
||||||
Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean
|
Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean
|
||||||
@@ -146,7 +147,7 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Function ExecuteNonQueryWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Boolean)
|
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 Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -187,33 +188,34 @@ Public Class DatabaseWithFallback
|
|||||||
Try
|
Try
|
||||||
Dim oResult As DataTable = Nothing
|
Dim oResult As DataTable = Nothing
|
||||||
Dim oTableResult As TableResult = 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 there is no client, we assume there is no service (configured)
|
||||||
If _Client Is Nothing Then
|
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)
|
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If ForceFallback flag is set, we go to database immediately
|
' If ForceFallback flag is set, we go to database immediately
|
||||||
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
|
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)
|
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If the table is not cached, we try going through the service
|
' If the table is not cached, we try going through the service
|
||||||
If Not IsTableCached(pDataTableName) Then
|
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)
|
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If there is a proper ConnectionId, we try going through the service
|
' If there is a proper ConnectionId, we try going through the service
|
||||||
If pConnectionId > 0 Then
|
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)
|
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
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)
|
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
@@ -221,9 +223,10 @@ Public Class DatabaseWithFallback
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
|
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)
|
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
|
||||||
Else
|
Else
|
||||||
|
_Logger.Debug("✔ GetDatatable: Datatable [{0}] fetched from AppServer Cache.", pDataTableName)
|
||||||
Return oTableResult.Table
|
Return oTableResult.Table
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -276,11 +279,13 @@ Public Class DatabaseWithFallback
|
|||||||
|
|
||||||
' If there is no client, we assume there is no service (configured)
|
' If there is no client, we assume there is no service (configured)
|
||||||
If _Client Is Nothing Then
|
If _Client Is Nothing Then
|
||||||
|
_Logger.Debug("ExecuteNonQuery - Client is empty, falling back to direct database access.")
|
||||||
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
|
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If ForceFallback flag is set, we go to database immediately
|
' If ForceFallback flag is set, we go to database immediately
|
||||||
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
|
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
|
||||||
|
_Logger.Debug("ExecuteNonQuery - ForceFallback is set, falling back to direct database access.")
|
||||||
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
|
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -294,7 +299,9 @@ Public Class DatabaseWithFallback
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function IsTableCached(pName As String) As Boolean
|
Private Function IsTableCached(pName As String) As Boolean
|
||||||
|
_Logger.Debug("IsTableCached: Checking if table [{0}] is cached.", pName)
|
||||||
If _Client Is Nothing Then
|
If _Client Is Nothing Then
|
||||||
|
_Logger.Warn("⚠ IsTableCached: Client is nothing, cannot check if table is cached.")
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -303,42 +310,74 @@ Public Class DatabaseWithFallback
|
|||||||
|
|
||||||
Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
|
Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
|
||||||
Try
|
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
|
Dim oResult As GetDatatableResponse = Nothing
|
||||||
|
|
||||||
Select Case DatabaseType
|
Select Case DatabaseType
|
||||||
Case Constants.DatabaseType.ECM
|
Case Constants.DatabaseType.ECM
|
||||||
oResult = _Client.GetDatatableFromECM(pSQLCommand)
|
oResult = _Client.GetDatatableFromECM(pSQLCommand)
|
||||||
|
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
oResult = _Client.GetDatatableFromIDB(pSQLCommand)
|
oResult = _Client.GetDatatableFromIDB(pSQLCommand)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If oResult Is Nothing Then
|
If oResult Is Nothing OrElse oResult.OK = False Then
|
||||||
Throw New ApplicationException("Unexpected server error ocurred!")
|
_Logger.Warn("⚠ GetDatatableFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
|
||||||
End If
|
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
If oResult.OK = False Then
|
|
||||||
Throw New ApplicationException(oResult.ErrorMessage)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return oResult.Table
|
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
|
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)
|
_Logger.Error(ex)
|
||||||
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
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
|
Private Function GetDatatableFromDatabase(pSQLCommand As String, pDatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
|
||||||
Try
|
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
|
Select Case pDatabaseType
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
@@ -361,35 +400,68 @@ Public Class DatabaseWithFallback
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
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
|
Private Function GetScalarValueFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
|
||||||
Try
|
Try
|
||||||
Dim oResult As GetScalarValueResponse = Nothing
|
Dim oResult As GetScalarValueResponse = Nothing
|
||||||
|
_Logger.Debug("GetScalarValueFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
|
||||||
Select Case DatabaseType
|
Select Case DatabaseType
|
||||||
Case Constants.DatabaseType.ECM
|
Case Constants.DatabaseType.ECM
|
||||||
oResult = _Client.GetScalarValueFromECM(pSQLCommand)
|
oResult = _Client.GetScalarValueFromECM(pSQLCommand)
|
||||||
|
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
oResult = _Client.GetScalarValueFromIDB(pSQLCommand)
|
oResult = _Client.GetScalarValueFromIDB(pSQLCommand)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If oResult Is Nothing Then
|
If oResult Is Nothing OrElse oResult.OK = False Then
|
||||||
Throw New ApplicationException("Unexpected server error ocurred!")
|
_Logger.Warn("⚠ GetScalarValueFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
|
||||||
End If
|
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
If oResult.OK = False Then
|
|
||||||
Throw New ApplicationException(oResult.ErrorMessage)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return oResult.Scalar
|
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
|
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)
|
_Logger.Error(ex)
|
||||||
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
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
|
Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
|
||||||
Try
|
Try
|
||||||
|
_Logger.Debug("DBwFF GetScalarValueFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
|
||||||
Select Case DatabaseType
|
Select Case DatabaseType
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
Return _DatabaseIDB.GetScalarValue(pSQLCommand)
|
Return _DatabaseIDB.GetScalarValue(pSQLCommand)
|
||||||
@@ -419,35 +492,68 @@ Public Class DatabaseWithFallback
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
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
|
Private Function ExecuteNonQueryFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oResult As ExecuteNonQueryResponse = Nothing
|
Dim oResult As ExecuteNonQueryResponse = Nothing
|
||||||
|
_Logger.Debug("ExecuteNonQueryFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
|
||||||
Select Case DatabaseType
|
Select Case DatabaseType
|
||||||
Case Constants.DatabaseType.ECM
|
Case Constants.DatabaseType.ECM
|
||||||
oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand)
|
oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand)
|
||||||
|
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand)
|
oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If oResult Is Nothing Then
|
If oResult Is Nothing OrElse oResult.OK = False Then
|
||||||
Throw New ApplicationException("Unexpected server error ocurred!")
|
_Logger.Warn("⚠ ExecuteNonQueryFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage))
|
||||||
End If
|
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
||||||
|
|
||||||
If oResult.OK = False Then
|
|
||||||
Throw New ApplicationException(oResult.ErrorMessage)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return oResult.Result
|
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
|
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)
|
_Logger.Error(ex)
|
||||||
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
|
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
|
Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
|
||||||
Try
|
Try
|
||||||
|
_Logger.Debug("ExecuteNonQueryFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
|
||||||
|
|
||||||
Select Case DatabaseType
|
Select Case DatabaseType
|
||||||
Case Constants.DatabaseType.IDB
|
Case Constants.DatabaseType.IDB
|
||||||
Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand)
|
Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand)
|
||||||
|
|||||||
@@ -44,6 +44,22 @@
|
|||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="DigitalData.Modules.Base, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.Modules.Config, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.Modules.Database, Version=2.3.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||||
@@ -296,22 +312,7 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Base\Base.vbproj">
|
<Content Include="ErrorLog.txt" />
|
||||||
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
|
||||||
<Name>Base</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Config\Config.vbproj">
|
|
||||||
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
|
|
||||||
<Name>Config</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Database\Database.vbproj">
|
|
||||||
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
|
|
||||||
<Name>Database</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Logging\Logging.vbproj">
|
|
||||||
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
|
||||||
<Name>Logging</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
333
EDMIAPI/ErrorLog.txt
Normal file
333
EDMIAPI/ErrorLog.txt
Normal 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)
|
||||||
@@ -25,7 +25,7 @@ Namespace Modules.IDB
|
|||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Warn("Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage)
|
Logger.Warn("⚠ Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage)
|
||||||
Return False
|
Return False
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("")>
|
<Assembly: AssemblyDescription("")>
|
||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("EDMIAPI")>
|
<Assembly: AssemblyProduct("EDMIAPI")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
||||||
<Assembly: AssemblyTrademark("1.6.1.1")>
|
<Assembly: AssemblyTrademark("2.7.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.6.1.1")>
|
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.6.1.1")>
|
<Assembly: AssemblyFileVersion("1.6.1.1")>
|
||||||
|
|||||||
@@ -265,6 +265,7 @@
|
|||||||
<Compile Include="GrapQLInterface\LoginData.vb" />
|
<Compile Include="GrapQLInterface\LoginData.vb" />
|
||||||
<Compile Include="GrapQLInterface\LogoutData.vb" />
|
<Compile Include="GrapQLInterface\LogoutData.vb" />
|
||||||
<Compile Include="GrapQLInterface\QueryData.vb" />
|
<Compile Include="GrapQLInterface\QueryData.vb" />
|
||||||
|
<Compile Include="ZUGFeRDInterface\ebInterface6.1\InvoiceType.vb" />
|
||||||
<Compile Include="ZUGFeRDInterface\Enums\ErrorCodes.vb" />
|
<Compile Include="ZUGFeRDInterface\Enums\ErrorCodes.vb" />
|
||||||
<Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" />
|
<Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" />
|
||||||
<Compile Include="ZUGFeRDInterface\Exceptions.vb" />
|
<Compile Include="ZUGFeRDInterface\Exceptions.vb" />
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("Modules.Interfaces")>
|
<Assembly: AssemblyProduct("Modules.Interfaces")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
||||||
<Assembly: AssemblyTrademark("2.4.4.0")>
|
<Assembly: AssemblyTrademark("2.5.0.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.4.0")>
|
<Assembly: AssemblyVersion("2.5.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.4.0")>
|
<Assembly: AssemblyFileVersion("2.5.0.0")>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Imports System.Xml
|
|||||||
Imports System.Xml.Serialization
|
Imports System.Xml.Serialization
|
||||||
Imports DigitalData.Modules.Interfaces.Exceptions
|
Imports DigitalData.Modules.Interfaces.Exceptions
|
||||||
Imports DigitalData.Modules.Interfaces.PDFEmbeds
|
Imports DigitalData.Modules.Interfaces.PDFEmbeds
|
||||||
|
Imports DigitalData.Modules.Interfaces.PropertyValues
|
||||||
Imports DigitalData.Modules.Interfaces.ZUGFeRD
|
Imports DigitalData.Modules.Interfaces.ZUGFeRD
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports GdPicture14
|
Imports GdPicture14
|
||||||
@@ -21,8 +22,6 @@ Public Class ZUGFeRDInterface
|
|||||||
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
|
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
|
||||||
Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x"
|
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_10 = "Version1_0"
|
||||||
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
|
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
|
||||||
Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1"
|
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_233 = "Version2_3_3_FacturX"
|
||||||
Public Const XMLSCHEMA_ZUGFERD_24 = "Version2_4_FacturX"
|
Public Const XMLSCHEMA_ZUGFERD_24 = "Version2_4_FacturX"
|
||||||
Public Const XMLSCHEMA_ZUGFERD_25 = "Version2_5_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_INVOICE = "UBL2_1_INVOICE"
|
||||||
Public Const XMLSCHEMA_UBL_21_CREDITNOTE = "UBL2_1_CREDITNOTE"
|
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_XML = "XML"
|
||||||
Public Const RECEIPT_TYPE_PDF = "PDF"
|
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_x_Schema As Boolean = True
|
||||||
Public Property AllowZugferd_2_3_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 AllowPeppol_3_x_Schema As Boolean = False
|
||||||
|
Public Property AllowEBInterface_Schema As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class ZugferdResult
|
Public Class ZugferdResult
|
||||||
@@ -152,6 +157,20 @@ Public Class ZUGFeRDInterface
|
|||||||
Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
|
Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
|
||||||
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
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
|
Catch ex As Exception
|
||||||
_logger.Error(ex)
|
_logger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -174,6 +193,27 @@ Public Class ZUGFeRDInterface
|
|||||||
Return Nothing
|
Return Nothing
|
||||||
End Function
|
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
|
Public Function GetSerializedXMLContentFromFile(oFileInfo As FileInfo) As ZugferdResult
|
||||||
Dim oResult = New ZugferdResult()
|
Dim oResult = New ZugferdResult()
|
||||||
Dim oMessage As String = String.Empty
|
Dim oMessage As String = String.Empty
|
||||||
@@ -194,6 +234,14 @@ Public Class ZUGFeRDInterface
|
|||||||
}
|
}
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
|
oResult = _Validator.ValidateZUGFeRDDocument(oResult)
|
||||||
|
|
||||||
|
If oResult.ValidationErrors.Count > 0 Then
|
||||||
|
_logger.Warn($"XML-Logik - Nach Validator() Errors: {oResult.ValidationErrors.Count}")
|
||||||
|
Else
|
||||||
|
_logger.Info($"XML-Logik - Nach Validator() NO Errors.")
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As ZUGFeRDExecption
|
Catch ex As ZUGFeRDExecption
|
||||||
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
|
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
|
||||||
' It also produces misleading error messages when checking if an attachment is a zugferd file.
|
' It also produces misleading error messages when checking if an attachment is a zugferd file.
|
||||||
@@ -385,6 +433,27 @@ Public Class ZUGFeRDInterface
|
|||||||
})
|
})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'' Reihenfolge 2.0 muss unverändert bleiben. Älteste Version immer zuerst!
|
||||||
|
If _Options.AllowZugferd_2_x_Schema Then
|
||||||
|
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
||||||
|
New AllowedType With {
|
||||||
|
.SchemaType = GetType(Version2_0.CrossIndustryInvoiceType),
|
||||||
|
.Specification = ZUGFERD_SPEC_2x,
|
||||||
|
.XMLSchema = XMLSCHEMA_ZUGFERD_20
|
||||||
|
},
|
||||||
|
New AllowedType With {
|
||||||
|
.SchemaType = GetType(Version2_1_1.CrossIndustryInvoiceType),
|
||||||
|
.Specification = ZUGFERD_SPEC_2x,
|
||||||
|
.XMLSchema = XMLSCHEMA_ZUGFERD_211
|
||||||
|
},
|
||||||
|
New AllowedType With {
|
||||||
|
.SchemaType = GetType(Version2_2_FacturX.CrossIndustryInvoiceType),
|
||||||
|
.Specification = ZUGFERD_SPEC_2x,
|
||||||
|
.XMLSchema = XMLSCHEMA_ZUGFERD_22
|
||||||
|
}
|
||||||
|
})
|
||||||
|
End If
|
||||||
|
|
||||||
'' Reihenfolge ab 2.3 geändert. Neuste Version immer zuerst bzw. oben
|
'' Reihenfolge ab 2.3 geändert. Neuste Version immer zuerst bzw. oben
|
||||||
If _Options.AllowZugferd_2_3_x_Schema Then
|
If _Options.AllowZugferd_2_3_x_Schema Then
|
||||||
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
||||||
@@ -411,27 +480,6 @@ Public Class ZUGFeRDInterface
|
|||||||
})
|
})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'' Reihenfolge 2.0 muss unverändert bleiben. Älteste Version immer zuerst!
|
|
||||||
If _Options.AllowZugferd_2_x_Schema Then
|
|
||||||
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
|
||||||
New AllowedType With {
|
|
||||||
.SchemaType = GetType(Version2_0.CrossIndustryInvoiceType),
|
|
||||||
.Specification = ZUGFERD_SPEC_2x,
|
|
||||||
.XMLSchema = XMLSCHEMA_ZUGFERD_20
|
|
||||||
},
|
|
||||||
New AllowedType With {
|
|
||||||
.SchemaType = GetType(Version2_1_1.CrossIndustryInvoiceType),
|
|
||||||
.Specification = ZUGFERD_SPEC_2x,
|
|
||||||
.XMLSchema = XMLSCHEMA_ZUGFERD_211
|
|
||||||
},
|
|
||||||
New AllowedType With {
|
|
||||||
.SchemaType = GetType(Version2_2_FacturX.CrossIndustryInvoiceType),
|
|
||||||
.Specification = ZUGFERD_SPEC_2x,
|
|
||||||
.XMLSchema = XMLSCHEMA_ZUGFERD_22
|
|
||||||
}
|
|
||||||
})
|
|
||||||
End If
|
|
||||||
|
|
||||||
If _Options.AllowPeppol_3_x_Schema Then
|
If _Options.AllowPeppol_3_x_Schema Then
|
||||||
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
oAllowedTypes.AddRange(New List(Of AllowedType) From {
|
||||||
New AllowedType With {
|
New AllowedType With {
|
||||||
@@ -447,6 +495,16 @@ Public Class ZUGFeRDInterface
|
|||||||
})
|
})
|
||||||
End If
|
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
|
For Each oType In oAllowedTypes
|
||||||
Dim oTypeName As String = oType.SchemaType.FullName
|
Dim oTypeName As String = oType.SchemaType.FullName
|
||||||
Dim oSerializer As New XmlSerializer(oType.SchemaType)
|
Dim oSerializer As New XmlSerializer(oType.SchemaType)
|
||||||
@@ -489,4 +547,5 @@ Public Class ZUGFeRDInterface
|
|||||||
Throw New ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, oMessage)
|
Throw New ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, oMessage)
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Public Enum Item_Types
|
Public Enum Item_Types
|
||||||
StringType '0
|
StringType = 0 '0
|
||||||
DateType '1
|
DateType = 1 '1
|
||||||
MoneyType '2
|
MoneyType = 2 '2
|
||||||
FileType '3
|
FileType = 3 '3
|
||||||
ListType '4 - vgl. Währung
|
ListType = 4 '4 - vgl. Währung
|
||||||
|
|
||||||
End Enum
|
End Enum
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ Public Class PDFEmbeds
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
|
Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
|
||||||
Continue For
|
Dim oMessage = String.Format("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
|
||||||
|
Throw New ApplicationException(oMessage)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports System.Xml
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports GdPicture.Internal.MSOfficeBinary.translator.Spreadsheet.XlsFileFormat.Records
|
||||||
|
Imports GdPicture.Internal.MSOfficeBinary.translator.Tools
|
||||||
|
|
||||||
Public Class PropertyValues
|
Public Class PropertyValues
|
||||||
Private _logger As Logger
|
Private _logger As Logger
|
||||||
@@ -122,12 +125,13 @@ Public Class PropertyValues
|
|||||||
' Returns nothing if oColumn.Value contains an empty list
|
' Returns nothing if oColumn.Value contains an empty list
|
||||||
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
|
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
|
||||||
|
|
||||||
_logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn)
|
'_logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn)
|
||||||
If oTableColumn = "INVOICE_SELLER_EMAIL" Then
|
'If oTableColumn = "INVOICE_SELLER_EMAIL" Then
|
||||||
Console.WriteLine("INVOICE_SELLER_EMAIL")
|
' Console.WriteLine("INVOICE_SELLER_EMAIL")
|
||||||
ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then
|
'ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then
|
||||||
Console.WriteLine("INVOICE_POSITION_ARTICLE")
|
' Console.WriteLine("INVOICE_POSITION_ARTICLE")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
|
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
|
||||||
If oColumn.Key.IsRequired 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.")
|
_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
|
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()
|
Dim oValuestring = oPropertyValue.ToString()
|
||||||
|
|
||||||
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
|
' 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
|
' This should hopefully show config errors
|
||||||
If TypeOf oPropertyValue Is List(Of Object) Then
|
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
|
oPropertyValue = Nothing
|
||||||
End If
|
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 Select
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -247,8 +261,12 @@ Public Class PropertyValues
|
|||||||
End If
|
End If
|
||||||
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
|
' 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()
|
Dim oValuestring = oPropertyValue.ToString()
|
||||||
|
|
||||||
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
|
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
|
||||||
@@ -275,6 +293,167 @@ Public Class PropertyValues
|
|||||||
Return oResult
|
Return oResult
|
||||||
End Function
|
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)
|
Public Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object)
|
||||||
Dim oNameParts As String() = PropertyName.Split("."c)
|
Dim oNameParts As String() = PropertyName.Split("."c)
|
||||||
|
|
||||||
@@ -421,8 +600,21 @@ Public Class PropertyValues
|
|||||||
firstElement = oList.FirstOrDefault()
|
firstElement = oList.FirstOrDefault()
|
||||||
If firstElement IsNot Nothing AndAlso IsArray(firstElement) Then
|
If firstElement IsNot Nothing AndAlso IsArray(firstElement) Then
|
||||||
|
|
||||||
|
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
|
' Attachments sind Byte-Arrays und müssen umgewandelt werden
|
||||||
Return Convert.ToBase64String(firstElement)
|
Return Convert.ToBase64String(firstElement)
|
||||||
|
Else
|
||||||
|
Return oStr
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Return DoGetFinalPropValue(oList.First())
|
Return DoGetFinalPropValue(oList.First())
|
||||||
@@ -464,4 +656,40 @@ Public Class PropertyValues
|
|||||||
Return Regex.IsMatch(Prop, _indexPattern)
|
Return Regex.IsMatch(Prop, _indexPattern)
|
||||||
End Function
|
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
|
End Class
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ Public Class Validator
|
|||||||
For Each oNode As XElement In oDecimalNodes
|
For Each oNode As XElement In oDecimalNodes
|
||||||
Dim oParsedValue As Decimal = 0.0
|
Dim oParsedValue As Decimal = 0.0
|
||||||
If Decimal.TryParse(oNode.Value, oParsedValue) = False Then
|
If Decimal.TryParse(oNode.Value, oParsedValue) = False Then
|
||||||
|
_logger.Warn($"Invalid Decimal Value in {oNode.Name.LocalName}")
|
||||||
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
||||||
.ElementName = oNode.Name.LocalName,
|
.ElementName = oNode.Name.LocalName,
|
||||||
.ElementValue = oNode.Value,
|
.ElementValue = oNode.Value,
|
||||||
@@ -50,6 +51,8 @@ Public Class Validator
|
|||||||
For Each oNode As XElement In oCurrencyCodeNodes
|
For Each oNode As XElement In oCurrencyCodeNodes
|
||||||
Dim oValid = ValidateCurrencyCode(oNode.Value)
|
Dim oValid = ValidateCurrencyCode(oNode.Value)
|
||||||
If oValid = False Then
|
If oValid = False Then
|
||||||
|
_logger.Warn($"Invalid CurrencyCode in {oNode.Name.LocalName}")
|
||||||
|
|
||||||
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
||||||
.ElementName = oNode.Name.LocalName,
|
.ElementName = oNode.Name.LocalName,
|
||||||
.ElementValue = oNode.Value,
|
.ElementValue = oNode.Value,
|
||||||
@@ -78,6 +81,7 @@ Public Class Validator
|
|||||||
|
|
||||||
Dim oValid = ValidateCurrencyCode(oCurrencyID)
|
Dim oValid = ValidateCurrencyCode(oCurrencyID)
|
||||||
If oValid = False Then
|
If oValid = False Then
|
||||||
|
_logger.Warn($"Invalid CurrencyID in {oNode.Name.LocalName}")
|
||||||
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
pResult.ValidationErrors.Add(New ZugferdValidationError() With {
|
||||||
.ElementName = oNode.Name.LocalName,
|
.ElementName = oNode.Name.LocalName,
|
||||||
.ElementValue = oCurrencyID,
|
.ElementValue = oCurrencyID,
|
||||||
|
|||||||
3373
Interfaces/ZUGFeRDInterface/ebInterface6.1/InvoiceType.vb
Normal file
3373
Interfaces/ZUGFeRDInterface/ebInterface6.1/InvoiceType.vb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ Public Class ADSyncJob
|
|||||||
MyBase.New(LogConfig, MSSQL)
|
MyBase.New(LogConfig, MSSQL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start
|
Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).StartDexAPISQL
|
||||||
Dim oJobName As String = [GetType]().Name
|
Dim oJobName As String = [GetType]().Name
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
4
Jobs/DEX_API/APISQLArgs.vb
Normal file
4
Jobs/DEX_API/APISQLArgs.vb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Public Class APISQLArgs
|
||||||
|
Inherits JobArgs
|
||||||
|
Public ProfileID As String
|
||||||
|
End Class
|
||||||
6
Jobs/DEX_API/APISQLConfig.vb
Normal file
6
Jobs/DEX_API/APISQLConfig.vb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Public Class APISQLConfig
|
||||||
|
Public Property BaseUrl As String = ""
|
||||||
|
Public Property Property1 As String = ""
|
||||||
|
Public Property Property2 As String = ""
|
||||||
|
Public Property Property3 As String = ""
|
||||||
|
End Class
|
||||||
@@ -5,15 +5,15 @@ Imports DigitalData.Modules.Database
|
|||||||
Imports DigitalData.Modules.Interfaces
|
Imports DigitalData.Modules.Interfaces
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class DEX_API
|
Public Class API_DEXSQLJob
|
||||||
Inherits JobBase
|
Inherits JobBase
|
||||||
Implements IJob(Of ADSyncArgs)
|
Implements IJob(Of APISQLArgs)
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
||||||
MyBase.New(LogConfig, MSSQL)
|
MyBase.New(LogConfig, MSSQL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub StartDex_API(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start
|
Public Sub StartDexAPISQL(Arguments As APISQLArgs) Implements IJob(Of APISQLArgs).StartDexAPISQL
|
||||||
Dim oJobName As String = [GetType]().Name
|
Dim oJobName As String = [GetType]().Name
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -27,7 +27,7 @@ Public Class DEX_API
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart
|
Public Function ShouldStart(Arguments As APISQLArgs) As Boolean Implements IJob(Of APISQLArgs).ShouldStart
|
||||||
Return Arguments.Enabled
|
Return Arguments.Enabled
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ Public Class GraphQLJob
|
|||||||
MyBase.New(LogConfig, MSSQL)
|
MyBase.New(LogConfig, MSSQL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
|
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).StartDexAPISQL
|
||||||
Try
|
Try
|
||||||
Dim oConfigPath As String = Args.QueryConfigPath
|
Dim oConfigPath As String = Args.QueryConfigPath
|
||||||
Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath)
|
Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath)
|
||||||
|
|||||||
@@ -17,5 +17,6 @@ Public Class JobConfig
|
|||||||
ADSync
|
ADSync
|
||||||
GraphQL
|
GraphQL
|
||||||
Test
|
Test
|
||||||
|
API_SQL
|
||||||
End Enum
|
End Enum
|
||||||
End Class
|
End Class
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
End Interface
|
End Interface
|
||||||
|
|
||||||
Public Interface IJob(Of T)
|
Public Interface IJob(Of T)
|
||||||
Sub Start(Arguments As T)
|
Sub StartDexAPISQL(Arguments As T)
|
||||||
|
|
||||||
Function ShouldStart(Arguments As T) As Boolean
|
Function ShouldStart(Arguments As T) As Boolean
|
||||||
End Interface
|
End Interface
|
||||||
|
|||||||
@@ -69,7 +69,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ADSync\ADSyncArgs.vb" />
|
<Compile Include="ADSync\ADSyncArgs.vb" />
|
||||||
<Compile Include="ADSync\ADSyncJob.vb" />
|
<Compile Include="ADSync\ADSyncJob.vb" />
|
||||||
<Compile Include="DEX_API\DEX_API.vb" />
|
<Compile Include="DEX_API\APISQLArgs.vb" />
|
||||||
|
<Compile Include="DEX_API\APISQLConfig.vb" />
|
||||||
|
<Compile Include="DEX_API\API_DEXSQLJob.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLArgs.vb" />
|
<Compile Include="GraphQL\GraphQLArgs.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLConfig.vb" />
|
<Compile Include="GraphQL\GraphQLConfig.vb" />
|
||||||
<Compile Include="GraphQL\GraphQLJob.vb" />
|
<Compile Include="GraphQL\GraphQLJob.vb" />
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("Modules.Jobs")>
|
<Assembly: AssemblyProduct("Modules.Jobs")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
||||||
<Assembly: AssemblyTrademark("3.8.0")>
|
<Assembly: AssemblyTrademark("3.9.0.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.8.0.0")>
|
<Assembly: AssemblyVersion("3.9.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("3.8.0.0")>
|
<Assembly: AssemblyFileVersion("3.9.0.0")>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Namespace ZUGFeRD
|
|||||||
Dim intCode As Integer = DirectCast(pErrorCode, Integer)
|
Dim intCode As Integer = DirectCast(pErrorCode, Integer)
|
||||||
oErrorCode = $"{EmailStrings.ErrorCodePraefix}{intCode}"
|
oErrorCode = $"{EmailStrings.ErrorCodePraefix}{intCode}"
|
||||||
|
|
||||||
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GUI_LANGUAGE_PHRASE WHERE TITLE = '{oErrorCode}'"
|
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GUI_LANGUAGE_PHRASE WITH (NOLOCK) WHERE TITLE = '{oErrorCode}'"
|
||||||
If _mssql.GetScalarValue(oSQL) > 0 Then
|
If _mssql.GetScalarValue(oSQL) > 0 Then
|
||||||
useLegacyMethod = False
|
useLegacyMethod = False
|
||||||
Else
|
Else
|
||||||
@@ -59,7 +59,7 @@ Namespace ZUGFeRD
|
|||||||
' Gibt es das Template in TBDD_EMAIL_TEMPLATE?
|
' Gibt es das Template in TBDD_EMAIL_TEMPLATE?
|
||||||
If useLegacyMethod = False AndAlso pTemplateId > 0 Then
|
If useLegacyMethod = False AndAlso pTemplateId > 0 Then
|
||||||
Try
|
Try
|
||||||
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_EMAIL_TEMPLATE WHERE GUID = {pTemplateId}"
|
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_EMAIL_TEMPLATE WITH (NOLOCK) WHERE GUID = {pTemplateId}"
|
||||||
If _mssql.GetScalarValue(oSQL) <= 0 Then
|
If _mssql.GetScalarValue(oSQL) <= 0 Then
|
||||||
_logger.Warn($"EMAIL_TEMPLATE [{pTemplateId}] not found in TBDD_EMAIL_TEMPLATE!")
|
_logger.Warn($"EMAIL_TEMPLATE [{pTemplateId}] not found in TBDD_EMAIL_TEMPLATE!")
|
||||||
useLegacyMethod = True
|
useLegacyMethod = True
|
||||||
@@ -137,7 +137,11 @@ Namespace ZUGFeRD
|
|||||||
, '{pParameter2}'
|
, '{pParameter2}'
|
||||||
, 77"
|
, 77"
|
||||||
|
|
||||||
|
If pTransaction IsNot Nothing Then
|
||||||
_mssql.ExecuteNonQuery(oExecute, pTransaction)
|
_mssql.ExecuteNonQuery(oExecute, pTransaction)
|
||||||
|
Else
|
||||||
|
_mssql.ExecuteNonQuery(oExecute)
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_logger.Error(ex)
|
_logger.Error(ex)
|
||||||
@@ -185,7 +189,7 @@ Namespace ZUGFeRD
|
|||||||
_logger.Debug("To: {0}", oEmailTo)
|
_logger.Debug("To: {0}", oEmailTo)
|
||||||
_logger.Debug("Subject: {0}", oSubject)
|
_logger.Debug("Subject: {0}", oSubject)
|
||||||
_logger.Debug("Body {0}", oFinalBodyText)
|
_logger.Debug("Body {0}", oFinalBodyText)
|
||||||
Dim osql = $"Select MAX(GUID) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{MessageId}'"
|
Dim osql = $"Select MAX(GUID) FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE EMAIL_MSGID = '{MessageId}'"
|
||||||
Dim oHistoryID = _mssql.GetScalarValue(osql)
|
Dim oHistoryID = _mssql.GetScalarValue(osql)
|
||||||
|
|
||||||
If IsNumeric(oHistoryID) Then
|
If IsNumeric(oHistoryID) Then
|
||||||
@@ -223,7 +227,7 @@ Namespace ZUGFeRD
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetEmailDataForMessageId(MessageId As String) As EmailData
|
Public Function GetEmailDataForMessageId(MessageId As String) As EmailData
|
||||||
Dim oSQL = $"SELECT EMAIL_FROM, EMAIL_SUBJECT FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{MessageId}'"
|
Dim oSQL = $"SELECT EMAIL_FROM, EMAIL_SUBJECT FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE EMAIL_MSGID = '{MessageId}'"
|
||||||
Try
|
Try
|
||||||
Dim oDatatable = _mssql.GetDatatable(oSQL)
|
Dim oDatatable = _mssql.GetDatatable(oSQL)
|
||||||
Dim oRow As DataRow
|
Dim oRow As DataRow
|
||||||
|
|||||||
@@ -10,5 +10,5 @@
|
|||||||
FileSizeLimitReachedException = 20008
|
FileSizeLimitReachedException = 20008
|
||||||
OutOfMemoryException = 20009
|
OutOfMemoryException = 20009
|
||||||
UnhandledException = 20010
|
UnhandledException = 20010
|
||||||
FileMoveException = 200011
|
FileMoveException = 20011
|
||||||
End Enum
|
End Enum
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
Imports System.Collections.Generic
|
Imports System.Collections.Generic
|
||||||
|
Imports System.Globalization
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
|
Imports System.Text
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Interfaces
|
Imports DigitalData.Modules.Interfaces
|
||||||
@@ -91,7 +93,8 @@ Namespace ZUGFeRD
|
|||||||
' Write Embedded Files to disk
|
' Write Embedded Files to disk
|
||||||
For Each oResult In pEmbeddedAttachments
|
For Each oResult In pEmbeddedAttachments
|
||||||
Try
|
Try
|
||||||
Dim oFileName As String = $"{pMessageId}~{oResult.FileName}"
|
Dim oCleanedFilename As String = BereinigeDateinamenAscii(oResult.FileName)
|
||||||
|
Dim oFileName As String = $"{pMessageId}~{oCleanedFilename}"
|
||||||
Dim oFilePath As String = Path.Combine(oAttachmentDirectory, oFileName)
|
Dim oFilePath As String = Path.Combine(oAttachmentDirectory, oFileName)
|
||||||
|
|
||||||
If Not File.Exists(oAttachmentDirectory) Then
|
If Not File.Exists(oAttachmentDirectory) Then
|
||||||
@@ -208,6 +211,7 @@ Namespace ZUGFeRD
|
|||||||
Return False ' Andere Fehler
|
Return False ' Andere Fehler
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetEmailPathWithSubjectAsName(RejectedEmailDirectory As String, UncleanedSubject As String) As String
|
Public Function GetEmailPathWithSubjectAsName(RejectedEmailDirectory As String, UncleanedSubject As String) As String
|
||||||
Dim oCleanSubject = String.Join("", UncleanedSubject.Split(Path.GetInvalidPathChars()))
|
Dim oCleanSubject = String.Join("", UncleanedSubject.Split(Path.GetInvalidPathChars()))
|
||||||
Dim oAttachmentDirectory = RejectedEmailDirectory
|
Dim oAttachmentDirectory = RejectedEmailDirectory
|
||||||
@@ -218,6 +222,41 @@ Namespace ZUGFeRD
|
|||||||
|
|
||||||
Return oAttachmentPath
|
Return oAttachmentPath
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 20.8.2026 - In den Dateinamen der Anhänge in einem PDF können Unicode-Zeichen vorkommen
|
||||||
|
''' die später nicht mehr verarbeitet werden können. sie werden hier rausgefiltert
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="pFilename"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Function BereinigeDateinamenAscii(pFilename As String) As String
|
||||||
|
If pFilename.IsNullOrEmpty() Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Restliche Diakritika entfernen (é, à, ñ, etc.)
|
||||||
|
Dim normalisiert As String = pFilename.Normalize(NormalizationForm.FormD)
|
||||||
|
Dim sb As New StringBuilder()
|
||||||
|
|
||||||
|
For Each c As Char In normalisiert
|
||||||
|
If CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.NonSpacingMark Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim code As Integer = AscW(c)
|
||||||
|
|
||||||
|
If code >= 32 AndAlso code <= 126 Then
|
||||||
|
If "\/:*?""<>|".Contains(c) Then
|
||||||
|
sb.Append("_")
|
||||||
|
Else
|
||||||
|
sb.Append(c)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Alles andere (z.B. 你好) wird komplett verworfen
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Public Class HashFunctions
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Check if Checksum exists in History Table
|
' Check if Checksum exists in History Table
|
||||||
Dim oCheckCommand = $"SELECT * FROM TBEMLP_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBEMLP_HISTORY WHERE UPPER(MD5HASH) = UPPER('{oMD5CheckSum}'))"
|
Dim oCheckCommand = $"SELECT * FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE GUID = (SELECT MAX(GUID) FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE UPPER(MD5HASH) = UPPER('{oMD5CheckSum}'))"
|
||||||
Dim oTable As DataTable = Database.GetDatatable(oCheckCommand, MSSQLServer.TransactionMode.NoTransaction)
|
Dim oTable As DataTable = Database.GetDatatable(oCheckCommand, MSSQLServer.TransactionMode.NoTransaction)
|
||||||
|
|
||||||
' If History entries could not be fetched, just return the MD5 Checksum
|
' If History entries could not be fetched, just return the MD5 Checksum
|
||||||
@@ -94,7 +94,7 @@ Public Class HashFunctions
|
|||||||
Public Function GetOriginalFilename(pFilename As String) As String
|
Public Function GetOriginalFilename(pFilename As String) As String
|
||||||
' Try to get the original filename from Attachment table
|
' Try to get the original filename from Attachment table
|
||||||
' If this fails, falls back to the new filename (<msgid>~Attm<i>.ext)
|
' If this fails, falls back to the new filename (<msgid>~Attm<i>.ext)
|
||||||
Dim oSQL = $"SELECT EMAIL_ATTMT FROM TBEMLP_HISTORY_ATTACHMENT WHERE EMAIL_ATTMT_INDEX = '{pFilename}'"
|
Dim oSQL = $"SELECT EMAIL_ATTMT FROM TBEMLP_HISTORY_ATTACHMENT WITH (NOLOCK) WHERE EMAIL_ATTMT_INDEX = '{pFilename}'"
|
||||||
Dim oEmailAttachment = Database.GetScalarValue(oSQL, MSSQLServer.TransactionMode.NoTransaction)
|
Dim oEmailAttachment = Database.GetScalarValue(oSQL, MSSQLServer.TransactionMode.NoTransaction)
|
||||||
Dim oOriginalName = ObjectEx.NotNull(oEmailAttachment, pFilename)
|
Dim oOriginalName = ObjectEx.NotNull(oEmailAttachment, pFilename)
|
||||||
Return oOriginalName
|
Return oOriginalName
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Private ReadOnly _embeds As PDFEmbeds
|
Private ReadOnly _embeds As PDFEmbeds
|
||||||
|
|
||||||
Private SQL_xRechnung_ItemTemplate As String = ""
|
Private SQL_xRechnung_ItemTemplate As String = ""
|
||||||
|
Private SQL_ebInterface_CompleteXMLItems As String = ""
|
||||||
|
|
||||||
Private ReadOnly _gdpictureLicenseKey As String
|
Private ReadOnly _gdpictureLicenseKey As String
|
||||||
Private ReadOnly _xRechnungCreator As XRechnungViewDocument
|
Private ReadOnly _xRechnungCreator As XRechnungViewDocument
|
||||||
@@ -81,6 +82,8 @@ Public Class ImportZUGFeRDFiles
|
|||||||
|
|
||||||
Public ZugferdFileCount As Integer = 0
|
Public ZugferdFileCount As Integer = 0
|
||||||
Public MD5Checksum As String = Nothing
|
Public MD5Checksum As String = Nothing
|
||||||
|
Public XMLSpecification As String = Nothing
|
||||||
|
Public XMLSchema As String = Nothing
|
||||||
|
|
||||||
Public EmailAttachmentFiles As New List(Of FileInfo)
|
Public EmailAttachmentFiles As New List(Of FileInfo)
|
||||||
Public EmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile)
|
Public EmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile)
|
||||||
@@ -114,22 +117,28 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Public Sub Start(Arguments As Object) Implements IJob.Start
|
Public Sub Start(Arguments As Object) Implements IJob.Start
|
||||||
Dim oArgs As WorkerArgs = Arguments
|
Dim oArgs As WorkerArgs = Arguments
|
||||||
Dim oAttachmentExtractor = New PDFEmbeds(_logConfig)
|
Dim oAttachmentExtractor = New PDFEmbeds(_logConfig)
|
||||||
|
Dim oSpecification As String = String.Empty
|
||||||
|
|
||||||
_EmailOutAccountId = oArgs.EmailOutProfileId
|
_EmailOutAccountId = oArgs.EmailOutProfileId
|
||||||
|
|
||||||
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
|
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
|
||||||
.AllowFacturX_Filename = oArgs.AllowFacturX,
|
.AllowFacturX_Filename = oArgs.AllowFacturX,
|
||||||
.AllowXRechnung_Filename = oArgs.AllowXRechnung,
|
.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)
|
_logger.Debug("Starting Job {0}", [GetType].Name)
|
||||||
If oArgs.AllowXRechnung Then
|
If oArgs.AllowXRechnung Or oArgs.AllowPeppolBISBill3x Or oArgs.AllowEBInterface Then
|
||||||
' TODO - Config-Schalter hat NIX mit XRechnung-Dateien u. Sichtbelegen zu tun, sondern nur mit Dateinamen zu tun.
|
|
||||||
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WITH (NOLOCK) WHERE TITLE = 'VWDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE_ITEMS'"
|
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)
|
SQL_xRechnung_ItemTemplate = _mssql.GetScalarValue(oSQL)
|
||||||
End If
|
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
|
Try
|
||||||
'For Each oPath As String In oArgs.WatchDirectory
|
'For Each oPath As String In oArgs.WatchDirectory
|
||||||
Dim oPath As String = oArgs.WatchDirectory
|
Dim oPath As String = oArgs.WatchDirectory
|
||||||
@@ -208,6 +217,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Try
|
Try
|
||||||
|
|
||||||
For Each oFile In oEInvoiceFileGroup
|
For Each oFile In oEInvoiceFileGroup
|
||||||
|
oSpecification = String.Empty
|
||||||
oFileCounter += 1
|
oFileCounter += 1
|
||||||
Dim oResult As ProcessFileResult
|
Dim oResult As ProcessFileResult
|
||||||
|
|
||||||
@@ -221,6 +231,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
_logger.Debug("eInvoice File found")
|
_logger.Debug("eInvoice File found")
|
||||||
oMD5CheckSum = oResult.MD5Checksum
|
oMD5CheckSum = oResult.MD5Checksum
|
||||||
oZUGFeRDCount = oResult.ZugferdFileCount
|
oZUGFeRDCount = oResult.ZugferdFileCount
|
||||||
|
oSpecification = oResult.XMLSpecification
|
||||||
oEmailAttachmentFiles.AddRange(oResult.EmailAttachmentFiles)
|
oEmailAttachmentFiles.AddRange(oResult.EmailAttachmentFiles)
|
||||||
oEmbeddedAttachmentFiles.AddRange(oResult.EmbeddedAttachmentFiles)
|
oEmbeddedAttachmentFiles.AddRange(oResult.EmbeddedAttachmentFiles)
|
||||||
Else ' No zugferd found!
|
Else ' No zugferd found!
|
||||||
@@ -439,21 +450,34 @@ Public Class ImportZUGFeRDFiles
|
|||||||
If oMoveDirectory = DIRECTORY_DONT_MOVE Then
|
If oMoveDirectory = DIRECTORY_DONT_MOVE Then
|
||||||
_logger.Info("Application Error occurred. Files for message Id {0} will not be moved.", oMessageId)
|
_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
|
oEInvoiceFileGroup.Item(0).Extension.Equals(".xml", StringComparison.OrdinalIgnoreCase) = True Then
|
||||||
_logger.Debug("Before Creating the PDF-File from XML data / Before Commit")
|
_logger.Debug("Before Creating the PDF-File from XML data / Before Commit")
|
||||||
|
|
||||||
oxRechnungHandle = True
|
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
|
' Hier das neue PDF erzeugen
|
||||||
'but before we need to get all Data we need
|
'but before we need to get all Data we need
|
||||||
MyTemplateValues_xInvDT = Nothing
|
MyTemplateValues_xInvDT = Nothing
|
||||||
Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate
|
Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate
|
||||||
oSQL_MsgIDReplace = oSQL_MsgIDReplace.Replace("@MSG_ID", oFileGroup.Key)
|
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)
|
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
|
||||||
|
|
||||||
If Not IsNothing(MyTemplateValues_xInvDT) Then
|
If Not IsNothing(MyTemplateValues_xInvDT) Then
|
||||||
@@ -597,6 +621,8 @@ Public Class ImportZUGFeRDFiles
|
|||||||
|
|
||||||
If oDocument IsNot Nothing Then
|
If oDocument IsNot Nothing Then
|
||||||
sqlResult = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs, oResult)
|
sqlResult = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs, oResult)
|
||||||
|
oResult.XMLSpecification = oDocument.Specification
|
||||||
|
oResult.XMLSchema = oDocument.UsedXMLSchema
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
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 oPropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
|
||||||
Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId)
|
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)
|
_logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count)
|
||||||
|
|
||||||
If oCheckResult.MissingProperties.Count > 0 Then
|
If oCheckResult.MissingProperties.Count > 0 Then
|
||||||
|
|||||||
@@ -33,5 +33,6 @@ Public Class WorkerArgs
|
|||||||
Public AllowZugferd2x As Boolean = True
|
Public AllowZugferd2x As Boolean = True
|
||||||
Public AllowZugferd23x As Boolean = True
|
Public AllowZugferd23x As Boolean = True
|
||||||
Public AllowPeppolBISBill3x As Boolean = False
|
Public AllowPeppolBISBill3x As Boolean = False
|
||||||
|
Public AllowEBInterface As Boolean = False
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -895,17 +895,55 @@ Public Class XRechnungViewDocument
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub RenderLabelValuePair(context As PdfRenderContext, label As String, value As String)
|
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
|
If context.CreateTextBox Then
|
||||||
Dim textBoxYPos As Integer = context.YPosition - 3
|
Dim textBoxYPos As Integer = context.YPosition - 3
|
||||||
context.PDF.DrawTextBox(fontResName, COL_VALUE_X, textBoxYPos, 90, YCoo_TextBoxPlus5(textBoxYPos),
|
context.PDF.DrawTextBox(fontResName, COL_VALUE_X, textBoxYPos, 90, YCoo_TextBoxPlus5(textBoxYPos),
|
||||||
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentCenter,
|
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentCenter,
|
||||||
value)
|
safeValue)
|
||||||
Else
|
Else
|
||||||
context.PDF.DrawText(fontResName, COL_VALUE_X, context.YPosition, value)
|
context.PDF.DrawText(fontResName, COL_VALUE_X, context.YPosition, safeValue)
|
||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
Private Sub RenderTextWithWrapping(context As PdfRenderContext, text As String)
|
||||||
If text.Length > MAX_TEXT_LENGTH_FULL Then
|
If text.Length > MAX_TEXT_LENGTH_FULL Then
|
||||||
|
|||||||
@@ -510,7 +510,6 @@ Public Class LogConfig
|
|||||||
' Add debug rule, if configured
|
' Add debug rule, if configured
|
||||||
If _EnableDebugLogging = True Then
|
If _EnableDebugLogging = True Then
|
||||||
_config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG)
|
_config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG)
|
||||||
oLogger.Info("DEBUG Logging is now Enabled.")
|
|
||||||
Else
|
Else
|
||||||
oLogger.Debug("DEBUG Logging is now Disabled.")
|
oLogger.Debug("DEBUG Logging is now Disabled.")
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
|
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
|
||||||
<Assembly: AssemblyProduct("Modules.Logging")>
|
<Assembly: AssemblyProduct("Modules.Logging")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||||
<Assembly: AssemblyTrademark("2.6.4.0")>
|
<Assembly: AssemblyTrademark("2.7.0.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.5.0")>
|
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.5.0")>
|
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ Namespace Mail
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
If pSession.User <> String.Empty Then
|
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
|
If pSession.AuthType = AUTH_OAUTH2 Then
|
||||||
' Use OAuth2 token
|
' Use OAuth2 token
|
||||||
@@ -273,10 +273,10 @@ Namespace Mail
|
|||||||
Public Function DisconnectFromServer() As Boolean
|
Public Function DisconnectFromServer() As Boolean
|
||||||
Try
|
Try
|
||||||
If Client IsNot Nothing Then
|
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)
|
DoClose(Client)
|
||||||
Session.Connected = False
|
Session.Connected = False
|
||||||
Logger.Info("Connection to Server [{0}] closed.", Session.Server)
|
Logger.Debug("Connection to Server [{0}] closed.", Session.Server)
|
||||||
Else
|
Else
|
||||||
Logger.Debug("No connection currently open. Exiting.")
|
Logger.Debug("No connection currently open. Exiting.")
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Database.Test", "Database.T
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}"
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMIService", "..\DDMonorepo\Service.EDMIService\EDMIService.vbproj", "{A8C3F298-76AB-4359-AB3C-986E313B4336}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user