From 6d4fa39f69fd57ac9444dfa3dd1899c57eea5dad Mon Sep 17 00:00:00 2001 From: Ahmed Afifi Date: Wed, 4 Sep 2024 20:54:12 +0300 Subject: [PATCH] update service code --- .../App_code/CoreWCF/NetHttpsBinding.cs | 45 +++++++++++++++++++ .../SelfHostedCoreWCFService.csproj | 41 +++++------------ 2 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/CoreWCF/NetHttpsBinding.cs diff --git a/src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/CoreWCF/NetHttpsBinding.cs b/src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/CoreWCF/NetHttpsBinding.cs new file mode 100644 index 000000000000..567efb8ab0c8 --- /dev/null +++ b/src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/CoreWCF/NetHttpsBinding.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#if NET + +using CoreWCF; +using CoreWCF.Channels; + +namespace WcfService +{ + //public enum BasicHttpsSecurityMode + //{ + // // + // // Summary: + // // The Transport security mode. + // Transport, + // // + // // Summary: + // // The TransportWithMessageCredential security mode. + // TransportWithMessageCredential + //} + + // Cast BasicHttpsSecurityMode (WCF) to BasicHttpSecurityMode (CoreWCF) + //internal enum BasicHttpsSecurityMode + //{ + // None, + // Transport, + // Message, + // TransportWithMessageCredential, + // TransportCredentialOnly + //} + + internal class NetHttpsBinding : NetHttpBinding + { + public NetHttpsBinding() : base((BasicHttpSecurityMode)BasicHttpsSecurityMode.Transport) + { + } + + public NetHttpsBinding(BasicHttpsSecurityMode securityMode) : base((BasicHttpSecurityMode)securityMode) + { + } + } +} +#endif diff --git a/src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/SelfHostedCoreWCFService.csproj b/src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/SelfHostedCoreWCFService.csproj index 422f7a554ed6..8fc75a89cce0 100644 --- a/src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/SelfHostedCoreWCFService.csproj +++ b/src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/SelfHostedCoreWCFService.csproj @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -24,52 +24,35 @@ - - - - - - - - - + + + - - - - - - - + - - - - - + + + - - -