wcf

.Net Core 2.0 call to WCF client configuration

旧时模样 提交于 2020-07-23 08:40:07
问题 I have a .NET Core 2.0 application and need to call a WCF client from one of its controllers, and pass the user credentials for authentication. Within the .net core app I created a reference for the WCF client using the Connected Services (WCF Web Service Reference Provider) and now in a process of configuring the call. Note that I can use the same endpoint form a 4.6 framework application without any problems. Here's my code: var binding = new BasicHttpBinding {Security = {Mode =

.Net Core 2.0 call to WCF client configuration

时光怂恿深爱的人放手 提交于 2020-07-23 08:39:27
问题 I have a .NET Core 2.0 application and need to call a WCF client from one of its controllers, and pass the user credentials for authentication. Within the .net core app I created a reference for the WCF client using the Connected Services (WCF Web Service Reference Provider) and now in a process of configuring the call. Note that I can use the same endpoint form a 4.6 framework application without any problems. Here's my code: var binding = new BasicHttpBinding {Security = {Mode =

.Net Core 2.0 call to WCF client configuration

回眸只為那壹抹淺笑 提交于 2020-07-23 08:38:13
问题 I have a .NET Core 2.0 application and need to call a WCF client from one of its controllers, and pass the user credentials for authentication. Within the .net core app I created a reference for the WCF client using the Connected Services (WCF Web Service Reference Provider) and now in a process of configuring the call. Note that I can use the same endpoint form a 4.6 framework application without any problems. Here's my code: var binding = new BasicHttpBinding {Security = {Mode =

WCF in asp.net core 2.0 - Could not establish trust relationship for the SSL/TLS secure channel with authority

北城余情 提交于 2020-07-19 11:29:07
问题 Previously I had an application targeting framework 4.5.1 and used Web Reference to add a WCF service. This works perfectly and was able to authenticate successfully with the server. old code: ServicePointManager.Expect100Continue = false; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; IService orderService = new Service(); // private method to load certificate var cert = LoadCertificate(@"....\00050._.1.p12", "pwd"); oIPGApiOrderService.ClientCertificates.Add(cert);

WCF in asp.net core 2.0 - Could not establish trust relationship for the SSL/TLS secure channel with authority

陌路散爱 提交于 2020-07-19 11:28:09
问题 Previously I had an application targeting framework 4.5.1 and used Web Reference to add a WCF service. This works perfectly and was able to authenticate successfully with the server. old code: ServicePointManager.Expect100Continue = false; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; IService orderService = new Service(); // private method to load certificate var cert = LoadCertificate(@"....\00050._.1.p12", "pwd"); oIPGApiOrderService.ClientCertificates.Add(cert);

Error on <serviceHostingEnvironment multipleSiteBindingsEnabled=“true”/> while publish on IIS

回眸只為那壹抹淺笑 提交于 2020-07-17 09:47:12
问题 I have one test wcf service with default methods and web config is : <system.web> <compilation debug="true" targetFramework="4.0"/> </system.web> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false

WCF / EF / SQL Server / VS2017 / C# : multi-tier application gets error when deployed to local IIS 10.0 as hosting server

僤鯓⒐⒋嵵緔 提交于 2020-07-10 10:27:27
问题 I am trying to deploy a Windows desktop application with service layer, logic layer and data layer. The data layer uses SQL Server with EF 6.2. The UI client layer is a Windows Forms application. The application works great in test debug mode when the service is hosted by the WcfSvcUtil.exe application with a service alias in IIS - no errors and all data retrieval and updates are working in test. Now, I have published the Service layer, logic layer and data layer as an empty web site to be

C# windows service - expose web interface

天涯浪子 提交于 2020-07-10 09:19:26
问题 I have created a web service that exposes web interface. the service run in console mode and i see the web interface public ServiceHost serviceHost = null; public ServiceHost serviceHost = null;; private readonly TestService s; public Service() { InitializeComponent(); s = new TestService(); } protected override void OnStart(string[] args) { Logger.Info("Start event"); if (serviceHost != null) { serviceHost.Close(); } // Create a ServiceHost for the CalculatorService type and // provide the

Calling WCF over HTTPS in Service Fabric : The request was aborted: Could not create SSL/TLS secure channel

落花浮王杯 提交于 2020-07-09 11:58:13
问题 I'm calling a WCF service over HTTPS. => The certificates are ok. See screenshot: The client certificates are installed under my account and local computer. Both available for export. So I have a piece of code that works in a console application. When I run the console app under Network Service, the service call works. When I paste this code inside a StatefullService (inside service fabric) I get the following exception. I've verified the ServicePointManager.SecurityProtocol It's System.Net

Cross Process (and machine) Synchronization (Semaphores)

北城以北 提交于 2020-07-09 06:10:29
问题 Background: My WCF application has to call a service that does not have any concurrency checking in it. It is a service created by a third party and getting them to add concurrency checking may not be possible. I can ensure that the only way to call the third party service is via my WCF application. So I am considering putting concurrency checking in my code. To do this, I will use an identifier that uniquely describes the data being modified. The idea is that if one call to the service is