jj
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
@@ -18,20 +18,19 @@
|
||||
</source>
|
||||
</sources>
|
||||
<sharedListeners>
|
||||
<add initializeData="E:\EDMService\Trace.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
name="Xml" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
|
||||
<add initializeData="E:\EDMService\Trace.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Xml" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack">
|
||||
<filter type="" />
|
||||
</add>
|
||||
</sharedListeners>
|
||||
<trace autoflush="true" />
|
||||
</system.diagnostics>
|
||||
<appSettings>
|
||||
<add key="FIREBIRD_DATASOURCE" value=""/>
|
||||
<add key="FIREBIRD_DATABASE_NAME" value=""/>
|
||||
<add key="FIREBIRD_DATABASE_USER" value=""/>
|
||||
<add key="FIREBIRD_DATABASE_PASS" value=""/>
|
||||
<add key="CONTAINER_PATH" value=""/>
|
||||
<add key="CONTAINER_PASSWORD" value=""/>
|
||||
<add key="FIREBIRD_DATASOURCE" value="" />
|
||||
<add key="FIREBIRD_DATABASE_NAME" value="" />
|
||||
<add key="FIREBIRD_DATABASE_USER" value="" />
|
||||
<add key="FIREBIRD_DATABASE_PASS" value="" />
|
||||
<add key="CONTAINER_PATH" value="" />
|
||||
<add key="CONTAINER_PASSWORD" value="" />
|
||||
</appSettings>
|
||||
<system.serviceModel>
|
||||
<diagnostics wmiProviderEnabled="true">
|
||||
@@ -39,27 +38,19 @@
|
||||
</diagnostics>
|
||||
<bindings>
|
||||
<netTcpBinding>
|
||||
<binding
|
||||
name="tcpBinding"
|
||||
sendTimeout="00:10:00"
|
||||
maxReceivedMessageSize="2147483647"
|
||||
maxBufferSize="2147483647"
|
||||
transferMode="Streamed"
|
||||
>
|
||||
<binding name="tcpBinding" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed">
|
||||
<readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="32" maxNameTableCharCount="2147483647" />
|
||||
</binding>
|
||||
</netTcpBinding>
|
||||
</bindings>
|
||||
<services>
|
||||
<service behaviorConfiguration="DefaultServiceBehavior" name="DigitalData.Services.EDMService.EDMService">
|
||||
<endpoint address="" binding="netTcpBinding" bindingConfiguration="tcpBinding"
|
||||
name="tcpBinding" contract="DigitalData.Services.EDMService.IEDMService">
|
||||
<endpoint address="" binding="netTcpBinding" bindingConfiguration="tcpBinding" name="tcpBinding" contract="DigitalData.Services.EDMService.IEDMService">
|
||||
<identity>
|
||||
<dns value="localhost" />
|
||||
</identity>
|
||||
</endpoint>
|
||||
<endpoint address="mex" binding="mexTcpBinding" name="MexTcpBinding"
|
||||
contract="IMetadataExchange" />
|
||||
<endpoint address="mex" binding="mexTcpBinding" name="MexTcpBinding" contract="IMetadataExchange" />
|
||||
<host>
|
||||
<baseAddresses>
|
||||
<add baseAddress="net.tcp://localhost:9000/DigitalData/Services/Main" />
|
||||
@@ -76,4 +67,9 @@
|
||||
</serviceBehaviors>
|
||||
</behaviors>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="FirebirdSql.Data.FirebirdClient" />
|
||||
<add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
|
||||
</DbProviderFactories>
|
||||
</system.data></configuration>
|
||||
@@ -6,7 +6,7 @@
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A8C3F298-76AB-4359-AB3C-986E313B4336}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>DigitalData.Services.EDMService.EDMWindowsService</StartupObject>
|
||||
<StartupObject>DigitalData.Services.EDMService.WindowsService</StartupObject>
|
||||
<RootNamespace>DigitalData.Services.EDMService</RootNamespace>
|
||||
<AssemblyName>EDMService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
@@ -47,29 +47,23 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Database">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=6.4.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Filesystem">
|
||||
<HintPath>..\..\DDMonorepo\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FirebirdSql.Data.FirebirdClient">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -92,10 +86,9 @@
|
||||
<Compile Include="AppConfig.vb" />
|
||||
<Compile Include="ContainerResult.vb" />
|
||||
<Compile Include="Exceptions.vb" />
|
||||
<Compile Include="Session.vb" />
|
||||
<Compile Include="DatabaseResult.vb" />
|
||||
<Compile Include="EDMService.vb" />
|
||||
<Compile Include="EDMWindowsService.vb">
|
||||
<Compile Include="WindowsService.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="IEDMService.vb" />
|
||||
@@ -145,6 +138,21 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Filesystem\Filesystem.vbproj">
|
||||
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
|
||||
<Name>Filesystem</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Modules.Database\Database.vbproj">
|
||||
<Project>{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}</Project>
|
||||
<Name>Database</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Modules.Logging\Logging.vbproj">
|
||||
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
||||
<Name>Logging</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
@@ -8,16 +8,11 @@ Imports DigitalData.Services.EDMService
|
||||
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)>
|
||||
Public Class EDMService
|
||||
Implements IEDMService
|
||||
Implements IDisposable
|
||||
|
||||
Public Shared Event ClientConnectedEvent As EventHandler(Of Session)
|
||||
Public Shared Event ClientDisconnectedEvent As EventHandler(Of Session)
|
||||
|
||||
Public Shared LogConfig As LogConfig
|
||||
Public Shared Database As Firebird
|
||||
Public Shared AppConfig As AppConfig
|
||||
|
||||
Private ReadOnly _session As Session
|
||||
Private ReadOnly _logger As Logger
|
||||
|
||||
Private _request As Request = Nothing
|
||||
@@ -29,13 +24,6 @@ Public Class EDMService
|
||||
Dim oUsername = oOperationContext.ServiceSecurityContext.WindowsIdentity.Name
|
||||
|
||||
_logger = LogConfig.GetLogger()
|
||||
_session = New Session(oUsername)
|
||||
|
||||
RaiseEvent ClientConnectedEvent(Me, _session)
|
||||
End Sub
|
||||
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
RaiseEvent ClientDisconnectedEvent(Me, _session)
|
||||
End Sub
|
||||
|
||||
#Region "Request"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
Public Class Session
|
||||
Public Username As String
|
||||
Public SessionId As String
|
||||
|
||||
Public Sub New(username As String)
|
||||
Me.Username = username
|
||||
Me.SessionId = Guid.NewGuid.ToString
|
||||
End Sub
|
||||
End Class
|
||||
@@ -5,7 +5,7 @@ Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Database.Exceptions
|
||||
|
||||
Public Class EDMWindowsService
|
||||
Public Class WindowsService
|
||||
Inherits ServiceBase
|
||||
|
||||
Private _serviceHost As ServiceHost = Nothing
|
||||
@@ -23,7 +23,7 @@ Public Class EDMWindowsService
|
||||
End Sub
|
||||
|
||||
Public Shared Sub Main()
|
||||
Run(New EDMWindowsService())
|
||||
Run(New WindowsService())
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnStart(ByVal args As String())
|
||||
5
SERVICES/DDEDM_NetworkService/packages.config
Normal file
5
SERVICES/DDEDM_NetworkService/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user