diff --git a/Service.EDMIService/App.config b/Service.EDMIService/App.config
index db5e4896..c9a15314 100644
--- a/Service.EDMIService/App.config
+++ b/Service.EDMIService/App.config
@@ -2,30 +2,28 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -33,42 +31,36 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
@@ -76,15 +68,18 @@
-
-
+
+
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
diff --git a/Service.EDMIService/EDMIService.vb b/Service.EDMIService/EDMIService.vb
index 50accd7e..53dc1f43 100644
--- a/Service.EDMIService/EDMIService.vb
+++ b/Service.EDMIService/EDMIService.vb
@@ -132,167 +132,167 @@ Public Class EDMIService
#End Region
#Region "Document (with FileContainer)"
- 'Public Function NewFile(FileName As String, Contents() As Byte) As DocumentResult Implements IEDMIService.NewFile
- ' Try
- ' Dim oContainer As FileContainer
- ' Dim oContainerId As String
+ Public Function NewFile(FileName As String, Contents() As Byte) As DocumentResult Implements IEDMIService.NewFile
+ Try
+ Dim oContainer As FileContainer
+ Dim oContainerId As String
- ' If Not TestUserAuth() Then
- ' Throw New Exception($"User {_username} not authorized.")
- ' End If
+ If Not TestUserAuth() Then
+ Throw New Exception($"User {_username} not authorized.")
+ End If
- ' oContainer = FileContainer.Create(LogConfig, AppConfig.ContainerPassword)
- ' oContainerId = oContainer.ContainerId
- ' _logger.Debug("Container created with id {0}", oContainerId)
+ oContainer = FileContainer.Create(LogConfig, AppConfig.ContainerPassword)
+ oContainerId = oContainer.ContainerId
+ _logger.Debug("Container created with id {0}", oContainerId)
- ' Dim oExtension As String = Path.GetExtension(FileName).Substring(1)
- ' _logger.Debug("File extension of file {0} is {1}", FileName, oExtension)
+ Dim oExtension As String = Path.GetExtension(FileName).Substring(1)
+ _logger.Debug("File extension of file {0} is {1}", FileName, oExtension)
- ' Dim oSQL = $"SELECT FNICM_NEW_DOC('010', '{oContainerId}', '{GetContainerName(oContainerId)}', '{FileName}', '{oExtension}', '{_username}') FROM RDB$DATABASE;"
- ' Dim oDocId As Int64 = Database.GetScalarValue(oSQL)
+ Dim oSQL = $"SELECT FNICM_NEW_DOC('010', '{oContainerId}', '{GetContainerName(oContainerId)}', '{FileName}', '{oExtension}', '{_username}') FROM RDB$DATABASE;"
+ Dim oDocId As Int64 = Database.GetScalarValue(oSQL)
- ' If oDocId = -1 Then
- ' _logger.Warn("Database returned -1 while creating Document Entry. File was not saved!")
- ' Return Nothing
- ' End If
+ If oDocId = -1 Then
+ _logger.Warn("Database returned -1 while creating Document Entry. File was not saved!")
+ Return Nothing
+ End If
- ' _logger.Debug("Database Entry created with DocId {0}", oDocId)
+ _logger.Debug("Database Entry created with DocId {0}", oDocId)
- ' oContainer.SetFile(Contents, FileName)
- ' oContainer.SaveAs(GetContainerPath(oContainerId))
+ oContainer.SetFile(Contents, FileName)
+ oContainer.SaveAs(GetContainerPath(oContainerId))
- ' _logger.Debug("File saved in Container!", FileName)
+ _logger.Debug("File saved in Container!", FileName)
- ' Dim oDocument = New DocumentObject(oContainerId, oDocId, FileName)
- ' Return New DocumentResult(oDocument)
- ' Catch ex As Exception
- ' _logger.Error(ex)
- ' Return New DocumentResult(ex.Message)
- ' End Try
- 'End Function
+ Dim oDocument = New DocumentObject(oContainerId, oDocId, FileName)
+ Return New DocumentResult(oDocument)
+ Catch ex As Exception
+ _logger.Error(ex)
+ Return New DocumentResult(ex.Message)
+ End Try
+ End Function
- 'Public Function UpdateFile(DocObject As DocumentObject, Contents() As Byte) As DocumentResult Implements IEDMIService.UpdateFile
- ' Try
- ' TestFileExists(DocObject.ContainerId)
+ Public Function UpdateFile(DocObject As DocumentObject, Contents() As Byte) As DocumentResult Implements IEDMIService.UpdateFile
+ Try
+ TestFileExists(DocObject.ContainerId)
- ' ' TODO: update db
+ ' TODO: update db
- ' Dim oFilePath = GetContainerPath(DocObject.ContainerId)
- ' Dim oFileContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oFilePath)
+ Dim oFilePath = GetContainerPath(DocObject.ContainerId)
+ Dim oFileContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oFilePath)
- ' oFileContainer.SetFile(Contents, oFileContainer.GetFile.FileName)
- ' oFileContainer.Save()
+ oFileContainer.SetFile(Contents, oFileContainer.GetFile.FileName)
+ oFileContainer.Save()
- ' Return New DocumentResult(DocObject)
- ' Catch ex As Exception
- ' _logger.Error(ex)
- ' Return Nothing
- ' End Try
- 'End Function
+ Return New DocumentResult(DocObject)
+ Catch ex As Exception
+ _logger.Error(ex)
+ Return Nothing
+ End Try
+ End Function
- 'Public Function GetFile(DocObject As DocumentObject) As DocumentResult Implements IEDMIService.GetFile
- ' Try
- ' TestFileExists(DocObject.ContainerId)
+ Public Function GetFile(DocObject As DocumentObject) As DocumentResult Implements IEDMIService.GetFile
+ Try
+ TestFileExists(DocObject.ContainerId)
- ' Dim oContainerPath = GetContainerPath(DocObject.ContainerId)
- ' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
- ' Dim oContents As Byte() = oContainer.GetFile().Contents
+ Dim oContainerPath = GetContainerPath(DocObject.ContainerId)
+ Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
+ Dim oContents As Byte() = oContainer.GetFile().Contents
- ' Return New DocumentResult(DocObject, oContents)
- ' Catch ex As Exception
- ' _logger.Error(ex)
- ' Return New DocumentResult(ex.Message)
- ' End Try
- 'End Function
+ Return New DocumentResult(DocObject, oContents)
+ Catch ex As Exception
+ _logger.Error(ex)
+ Return New DocumentResult(ex.Message)
+ End Try
+ End Function
- 'Public Function DeleteFile(DocObject As DocumentObject) As Boolean Implements IEDMIService.DeleteFile
- ' Try
- ' TestFileExists(DocObject.ContainerId)
+ Public Function DeleteFile(DocObject As DocumentObject) As Boolean Implements IEDMIService.DeleteFile
+ Try
+ TestFileExists(DocObject.ContainerId)
- ' Dim oFilePath = GetContainerPath(DocObject.ContainerId)
- ' IO.File.Delete(oFilePath)
+ Dim oFilePath = GetContainerPath(DocObject.ContainerId)
+ IO.File.Delete(oFilePath)
- ' 'TODO: Delete doc from db
+ 'TODO: Delete doc from db
- ' Return True
- ' Catch ex As Exception
- ' _logger.Error(ex)
- ' Return False
- ' End Try
- 'End Function
+ Return True
+ Catch ex As Exception
+ _logger.Error(ex)
+ Return False
+ End Try
+ End Function
- 'Private Function GetContainerPath(ContainerId As String) As String
- ' Return Path.Combine(AppConfig.ContainerPath, GetContainerName(ContainerId))
- 'End Function
+ Private Function GetContainerPath(ContainerId As String) As String
+ Return Path.Combine(AppConfig.ContainerPath, GetContainerName(ContainerId))
+ End Function
- 'Private Function GetContainerName(ContainerId As String) As String
- ' Return ContainerId & ".enc"
- 'End Function
+ Private Function GetContainerName(ContainerId As String) As String
+ Return ContainerId & ".enc"
+ End Function
- 'Private Sub TestFileExists(ContainerId)
- ' Dim oContainerPath = GetContainerPath(ContainerId)
+ Private Sub TestFileExists(ContainerId)
+ Dim oContainerPath = GetContainerPath(ContainerId)
- ' If Not IO.File.Exists(oContainerPath) Then
- ' Throw New FileNotFoundException("Container existiert nicht", oContainerPath)
- ' End If
- 'End Sub
+ If Not IO.File.Exists(oContainerPath) Then
+ Throw New FileNotFoundException("Container existiert nicht", oContainerPath)
+ End If
+ End Sub
- 'Public Function GetDocumentByDocumentId(DocumentId As Long) As DocumentResult Implements IEDMIService.GetDocumentByDocumentId
- ' Try
- ' Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE GUID = {DocumentId}"
- ' Dim oTable = Database.GetDatatable(oSQL)
+ Public Function GetDocumentByDocumentId(DocumentId As Long) As DocumentResult Implements IEDMIService.GetDocumentByDocumentId
+ Try
+ Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE GUID = {DocumentId}"
+ Dim oTable = Database.GetDatatable(oSQL)
- ' If oTable.Rows.Count = 0 Then
- ' Return New DocumentResult("Document not found")
- ' End If
+ If oTable.Rows.Count = 0 Then
+ Return New DocumentResult("Document not found")
+ End If
- ' Dim oRow As DataRow = oTable.Rows.Item(0)
- ' Dim oDocument As New DocumentObject(
- ' oRow.Item("CONTAINER_ID"),
- ' oRow.Item("GUID"),
- ' oRow.Item("ORIGINAL_FILENAME")
- ' )
+ Dim oRow As DataRow = oTable.Rows.Item(0)
+ Dim oDocument As New DocumentObject(
+ oRow.Item("CONTAINER_ID"),
+ oRow.Item("GUID"),
+ oRow.Item("ORIGINAL_FILENAME")
+ )
- ' TestFileExists(oDocument.ContainerId)
+ TestFileExists(oDocument.ContainerId)
- ' Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
- ' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
- ' Dim oContents As Byte() = oContainer.GetFile().Contents
+ Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
+ Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
+ Dim oContents As Byte() = oContainer.GetFile().Contents
- ' Return New DocumentResult(oDocument, oContents)
- ' Catch ex As Exception
- ' Return New DocumentResult(ex.Message)
- ' End Try
- 'End Function
+ Return New DocumentResult(oDocument, oContents)
+ Catch ex As Exception
+ Return New DocumentResult(ex.Message)
+ End Try
+ End Function
- 'Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResult Implements IEDMIService.GetDocumentByContainerId
- ' Try
- ' Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE CONTAINER_ID = '{ContainerId}'"
- ' Dim oTable = Database.GetDatatable(oSQL)
+ Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResult Implements IEDMIService.GetDocumentByContainerId
+ Try
+ Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE CONTAINER_ID = '{ContainerId}'"
+ Dim oTable = Database.GetDatatable(oSQL)
- ' If oTable.Rows.Count = 0 Then
- ' Return New DocumentResult("Document not found")
- ' End If
+ If oTable.Rows.Count = 0 Then
+ Return New DocumentResult("Document not found")
+ End If
- ' Dim oRow As DataRow = oTable.Rows.Item(0)
- ' Dim oDocument As New DocumentObject(
- ' oRow.Item("CONTAINER_ID"),
- ' oRow.Item("GUID"),
- ' oRow.Item("ORIGINAL_FILENAME")
- ' )
+ Dim oRow As DataRow = oTable.Rows.Item(0)
+ Dim oDocument As New DocumentObject(
+ oRow.Item("CONTAINER_ID"),
+ oRow.Item("GUID"),
+ oRow.Item("ORIGINAL_FILENAME")
+ )
- ' TestFileExists(oDocument.ContainerId)
+ TestFileExists(oDocument.ContainerId)
- ' Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
- ' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
- ' Dim oContents As Byte() = oContainer.GetFile().Contents
+ Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
+ Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
+ Dim oContents As Byte() = oContainer.GetFile().Contents
- ' Return New DocumentResult(oDocument, oContents)
- ' Catch ex As Exception
- ' Return New DocumentResult(ex.Message)
- ' End Try
- 'End Function
+ Return New DocumentResult(oDocument, oContents)
+ Catch ex As Exception
+ Return New DocumentResult(ex.Message)
+ End Try
+ End Function
#End Region
#Region "Document"
diff --git a/Service.EDMIService/EDMIService.vbproj b/Service.EDMIService/EDMIService.vbproj
index 1c164a29..65fd134b 100644
--- a/Service.EDMIService/EDMIService.vbproj
+++ b/Service.EDMIService/EDMIService.vbproj
@@ -11,8 +11,24 @@
EDMIService512Console
- v4.6.1
+ v4.7.2true
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+ AnyCPU
@@ -47,12 +63,12 @@
On
-
- ..\..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll
+
+ ..\packages\FirebirdSql.Data.FirebirdClient.6.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll
- ..\..\packages\NLog.4.7.0\lib\net45\NLog.dll
+ ..\packages\NLog.4.7.0\lib\net45\NLog.dll
@@ -64,6 +80,7 @@
+
@@ -162,5 +179,17 @@
Logging
+
+
+ False
+ Microsoft .NET Framework 4.6.1 %28x86 und x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
\ No newline at end of file
diff --git a/Service.EDMIService/IEDMIService.vb b/Service.EDMIService/IEDMIService.vb
index b5dcf705..d7b15caa 100644
--- a/Service.EDMIService/IEDMIService.vb
+++ b/Service.EDMIService/IEDMIService.vb
@@ -28,23 +28,23 @@ Interface IEDMIService
#End Region
#Region "Document (with FileContainer)"
- '
- 'Function NewFile(FileName As String, Contents As Byte()) As DocumentResult
+
+ Function NewFile(FileName As String, Contents As Byte()) As DocumentResult
- '
- 'Function UpdateFile(DocObject As DocumentObject, Contents As Byte()) As DocumentResult
+
+ Function UpdateFile(DocObject As DocumentObject, Contents As Byte()) As DocumentResult
- '
- 'Function GetFile(DocObject As DocumentObject) As DocumentResult
+
+ Function GetFile(DocObject As DocumentObject) As DocumentResult
- '
- 'Function DeleteFile(DocObject As DocumentObject) As Boolean
+
+ Function DeleteFile(DocObject As DocumentObject) As Boolean
- '
- 'Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResult
+
+ Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResult
- '
- 'Function GetDocumentByContainerId(ContainerId As String) As DocumentResult
+
+ Function GetDocumentByContainerId(ContainerId As String) As DocumentResult
#End Region
#Region "Document (New)"
diff --git a/Service.EDMIService/My Project/Resources.Designer.vb b/Service.EDMIService/My Project/Resources.Designer.vb
index 51507018..3cd07b10 100644
--- a/Service.EDMIService/My Project/Resources.Designer.vb
+++ b/Service.EDMIService/My Project/Resources.Designer.vb
@@ -22,7 +22,7 @@ Namespace My.Resources
'''
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''
- _
@@ -39,7 +39,7 @@ Namespace My.Resources
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Services.IDBService.Resources", GetType(Resources).Assembly)
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Services.EDMIService.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
diff --git a/Service.EDMIService/My Project/Settings.Designer.vb b/Service.EDMIService/My Project/Settings.Designer.vb
index eea38754..63f0e69c 100644
--- a/Service.EDMIService/My Project/Settings.Designer.vb
+++ b/Service.EDMIService/My Project/Settings.Designer.vb
@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
_
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -62,8 +62,8 @@ Namespace My
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
-
-
+
+ _
Friend ReadOnly Property Settings() As Global.DigitalData.Services.EDMIService.My.MySettings
Get
Return Global.DigitalData.Services.EDMIService.My.MySettings.Default
diff --git a/Service.EDMIService/WindowsService.vb b/Service.EDMIService/WindowsService.vb
index 6541fb46..8e616f5c 100644
--- a/Service.EDMIService/WindowsService.vb
+++ b/Service.EDMIService/WindowsService.vb
@@ -64,7 +64,7 @@ Public Class WindowsService
_logger.Debug("Starting WCF ServiceHost...")
- _serviceHost = New ServiceHost(GetType(IEDMIService))
+ _serviceHost = New ServiceHost(GetType(EDMIService))
_serviceHost.Open()
_logger.Debug("WCF ServiceHost started.")
diff --git a/Service.EDMIService/packages.config b/Service.EDMIService/packages.config
index da1b48cf..380efd84 100644
--- a/Service.EDMIService/packages.config
+++ b/Service.EDMIService/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file