wcf

WCF Service TLS 1.2 Enforcement

不想你离开。 提交于 2021-01-29 08:45:06
问题 We are trying to enforce TLS 1.2 in our WCF Service. We have our WCF Service hosted on IIS on our VM Boxes. We are not sure how to disable TLS 1.0 and TLS 1.1 for our service. We have tried the following approach: Configuration change in our WCF Service (Server side) and (client side)** – For the client side, we added the following code in our main method – Remove insecure protocols (SSL3, TLS 1.0, TLS 1.1) ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Ssl3;

Publish a WCFService doesn't work; Debugging-mode works

旧时模样 提交于 2021-01-29 08:21:55
问题 I want to start an default webservice-project, where I can send data over a service. When I go to debug the API through VS then everything works fine, but not when I try to use it over IIS. I created an WcfServiceLibrary-Project in Visual Studio 2017. I then right-clicked on the project (in the solution explorer) and then published it to a folder A. I also didn't do anything special at IIS (all the things are still on localhost.): I activated the default windows-feature "IIS". (The default

WCF ContractFilter Mismatch when enabling Reliable Session

﹥>﹥吖頭↗ 提交于 2021-01-29 07:41:51
问题 I have a WCF service hosted in a Windows Service. I then have a GUI(client) that then communicates to this service. It has recently been reported that communication with the service stops after being idle for 10 minutes. I have done a bit of research and it looks like the service is discarding the connection due to inactivity. Therefore I want to increase the receive timeout and enable reliable sessions and set an inactivityTimeout to be longer. However when I do this in both the WCF service

WCF protobuf endpoint 400 bad request

我的未来我决定 提交于 2021-01-29 07:05:23
问题 I have WCF service with DataContract json serialization. I would like to add service endpoints to consume Protobuf data messages. I tried to use nugget package ProtoBuf.Services.WCF. Added endpoint via web.config configuration. However, every request on protobuf endpoint with address "proto" returns 400 Bad request. Web.config sample is written bellow. Endpoint with default address "" works properly. Get method: HTTP 200 OK http://localhost:65460/BeaconService.svc/GetData HTTP 400 BAD REQUEST

Powershell New-WebServiceProxy - how to call WCF service

丶灬走出姿态 提交于 2021-01-29 07:04:47
问题 I'm trying to call a WCF service from PowerShell. This is what I have so far based on a few misc example I found on the web: # Create the WebSvcURL variable and pass the WSDL URL $WebSvcURL= “http://localhost/DEMO/SetPassKey/SetPassKey_Logic_SetPassKeyWebService_SetPassKeyWCF.svc?wsdl“ #Create the Web Service Proxy Object #$serviceProxy = New-WebServiceProxy -Uri $WebSvcURL -Namespace "http://Sample.SetPassKey.Logic" -Class Program -UseDefaultCredential $serviceProxy = New-WebServiceProxy

Adding classes to WCF service library

狂风中的少年 提交于 2021-01-29 06:31:48
问题 I have a class that defines a transaction that needs to be shared between two separate applications. They both have references to this library and can use the class as a data type, but cannot invoke any of its methods: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using ServerLibrary.MarketService; namespace ServerLibrary { [ServiceContract] public interface IService { [OperationContract]

Adding classes to WCF service library

痴心易碎 提交于 2021-01-29 06:21:58
问题 I have a class that defines a transaction that needs to be shared between two separate applications. They both have references to this library and can use the class as a data type, but cannot invoke any of its methods: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using ServerLibrary.MarketService; namespace ServerLibrary { [ServiceContract] public interface IService { [OperationContract]

WCF: Not able to connect to service after enabling TLS 1.2 and disabling SSL

假如想象 提交于 2021-01-29 05:56:00
问题 We are in process of upgrading our product to use TLS 1.2 version. To do that, we upgraded all the project from .net 4.6.2 to .net 4.7.2 version and built it. I am seeing one issue, specific to WCF service while opening a channel (proxy as ICommunicationObject).Open(); I have this in my code already: // https://docs.microsoft.com/en-us/dotnet/framework/whats-new/#wcf47 AppContext.SetSwitch("Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols", false); AppContext

“Could not establish trust relationship for the SSL/TLS secure channel with authority” for SOAP in .NET 4.6.2

◇◆丶佛笑我妖孽 提交于 2021-01-29 05:40:28
问题 I am trying to make a SOAP WCF call to an internal application from .NET 4.6.2 and I get the error above. I found a solution that I thought would work, but upon further investigation it is only applicable to .NET 4.5: System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => true; Is there a comperable solution for .NET 4.6? I am not concerned about the security implications, this is for internal testing only. 回答1: For the validation of the server

WCF service with multiple service contracts with duplicate method names in single wsdl

淺唱寂寞╮ 提交于 2021-01-29 04:58:07
问题 Continuing this and this questions. I have two service contract with the same methods: [ServiceContract] public interface IServices1 { [OperationContract] string GetData(int value); } [ServiceContract] public interface IServices2 { [OperationContract] string GetData(int value); } And service: public class Service : IServices1, IServices2 { string IServices1.GetData(int value) { return string.Format("You entered: {0}", value); } string IServices2.GetData(int value) { return string.Format("You