create directory on import, version filename

This commit is contained in:
Jonathan Jenne
2020-04-08 11:38:34 +02:00
parent a7e48a939c
commit 425d51c65c
8 changed files with 86 additions and 47 deletions

View File

@@ -4,20 +4,21 @@ Imports System.Xml
Public Class Channel
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
Return New NetTcpBinding() With {
.MaxReceivedMessageSize = Constants.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE,
.MaxConnections = Constants.MAX_CONNECTIONS,
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
.ClientCredentialType = AuthenticationMode
}
},
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
.MaxArrayLength = Constants.MAX_ARRAY_LENGTH,
.MaxStringContentLength = Constants.MAX_STRING_CONTENT_LENGTH
.MaxReceivedMessageSize = Constants.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE,
.MaxConnections = Constants.MAX_CONNECTIONS,
.TransferMode = TransferMode.Buffered,
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
.ClientCredentialType = AuthenticationMode
}
},
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
.MaxArrayLength = Constants.MAX_ARRAY_LENGTH,
.MaxStringContentLength = Constants.MAX_STRING_CONTENT_LENGTH
}
}
End Function
End Class

View File

@@ -1,8 +1,12 @@
Public Class Constants
Public Const MAX_RECEIVED_MESSAGE_SIZE = 2147483647
Public Const MAX_BUFFER_SIZE = 2147483647
Public Const MAX_BUFFER_POOL_SIZE = 2147483647
Public Const MAX_CONNECTIONS = 10000
' Infos about MaxBufferSize and MaxBufferPoolSize
' https://social.msdn.microsoft.com/Forums/vstudio/en-US/d6e234d3-942f-4e9d-8470-32618d3f3212/maxbufferpoolsize-vs-maxbuffersize?forum=wcf
Public Const MAX_RECEIVED_MESSAGE_SIZE = 2147483647 ' 1GB
Public Const MAX_BUFFER_SIZE = 2147483647 ' 10MB
Public Const MAX_BUFFER_POOL_SIZE = 2147483647 ' 40MB
Public Const MAX_CONNECTIONS = 500
Public Const MAX_ARRAY_LENGTH = 2147483647
Public Const MAX_STRING_CONTENT_LENGTH = 2147483647
End Class