nettcpbinding

Dynamically set endpoint address in wcf client (with net tcp binding)

旧街凉风 提交于 2019-11-30 16:02:39
So I'm not overly familiar with WCF and all the stuff I've googled hasn't helped me with how to achieve what I need. Sorry if this is a dumb question :) Basically there is a server app with services exposed with WCF (net tcp binding). I've written a new console app and I need to call the service. So I can achieve this by adding a dll for the proxy project we have and by adding a bunch of config files (such as WCFClientBindings, WCFClientEndPoints). If I use a defined end point then I can call code like this: using (var partyProxy = new PartyControllerProxy()) { // execute server method

WCF with netTcpBinding and Certificate transport security

牧云@^-^@ 提交于 2019-11-30 10:28:14
I need to secure a WCF service that uses netTcpBinding and connects directly with a Windows Forms based application. I only need it to be secured at the transport layer. I'm pretty sure that I have it working locally, i.e. I can run the service locally, and connect to it with the client. When I try to setup the service so that it is running on a server as opposed to my local machine, I'm having certificate issues. The error log says that the certificate must have a private key that is capable of key exchange and that the process must have access rights for the private key. I'm using a

How to properly close a client proxy (An existing connection was forcibly closed by the remote host)?

不想你离开。 提交于 2019-11-30 07:10:41
问题 Please don't close as duplicate until you read the question to the end; I already googled for hours without success. EDIT: Now I'm convinced it's related to the way WCF caches opened TCP connections (connection pooling). Please take a look at edit #5 at the end of he question. I basically have a WCF service that uses a netTcpBinding configuration. Even if I close the client proxy gracefully (see code below), server always logs " System.Net.Sockets.SocketException (0x80004005): An existing

Add service reference when using netTcp binding

隐身守侯 提交于 2019-11-30 02:08:36
I have a WCF service that I tested by copying its interfaces to a sample client project. Now I want to work properly by adding a service reference. The service is hosted in windows hosting (using installUtil ). The service has 2 projects - externals (interfaces + datacontracts) and internals (implementations). For some reason it didn't have an app.config so I added one manually: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="ExecutionService" behaviorConfiguration="Default"> <endpoint name="TCPEndpoint" address="" binding ="netTcpBinding

netTcpBinding or wsHttpBinding

余生长醉 提交于 2019-11-30 00:50:41
问题 I have a WCF Service hosted as Windows Service and client is an ASP.Net application consuming WCF Service methods. In process of implementing security, I am confused over which among netTcpBinding / wsHttpBinding will be suitable for my case. Most likely all the applications in scene (WCF Service, Windows Service, ASP.Net Website) will be sitting on different servers in our office, thus in an Intranet. ASP.Net website will be accessed by users over Internet. Though, I can always use

WCF with netTcpBinding and Certificate transport security

▼魔方 西西 提交于 2019-11-29 15:40:37
问题 I need to secure a WCF service that uses netTcpBinding and connects directly with a Windows Forms based application. I only need it to be secured at the transport layer. I'm pretty sure that I have it working locally, i.e. I can run the service locally, and connect to it with the client. When I try to setup the service so that it is running on a server as opposed to my local machine, I'm having certificate issues. The error log says that the certificate must have a private key that is capable

Net TCP binding: The URI prefix is not recognized

感情迁移 提交于 2019-11-29 14:02:19
This really is bugging me for a couple of hours. I created the simplest WCF service using a TCP binding. namespace WcfTcpService { public class TestTcpService : ITestTcpService { public string Hello(string name) { return "Hello, " + name + "!"; } } } namespace WcfTcpService { [ServiceContract] public interface ITestTcpService { [OperationContract] string Hello(string name); } } Web.config file has the following section: <system.serviceModel> <services> <service name="WcfTcpService.TestTcpService" behaviorConfiguration="TestServiceBehavior"> <host> <baseAddresses> <add baseAddress="net.tcp:/

WCF is slow when reliable session is ON and with burst async request

别来无恙 提交于 2019-11-29 08:26:33
For experiments, I created a simple "Hello World" WCF service and client using .NET 4.5 on VS2012. The server is hosted on a console application and use net.tcp binding. I wrote the client code to send a burst of async requests (a total of 700 requests) to the server. Everything went fine until I turned ON the Reliable session feature of the service. After it is ON, the service suddenly ran very slow and it took almost a minute on my machine to complete the 700 requests. I tried to fine tune the Concurrency and Throttling parameters (see below) but it didn't help. Does anyone know why this

How to properly close a client proxy (An existing connection was forcibly closed by the remote host)?

我是研究僧i 提交于 2019-11-29 01:53:02
Please don't close as duplicate until you read the question to the end; I already googled for hours without success. EDIT: Now I'm convinced it's related to the way WCF caches opened TCP connections (connection pooling). Please take a look at edit #5 at the end of he question. I basically have a WCF service that uses a netTcpBinding configuration. Even if I close the client proxy gracefully (see code below), server always logs " System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host ". I've narrowed down the issue to the most basic WCF

Add service reference when using netTcp binding

孤者浪人 提交于 2019-11-28 23:03:00
问题 I have a WCF service that I tested by copying its interfaces to a sample client project. Now I want to work properly by adding a service reference. The service is hosted in windows hosting (using installUtil ). The service has 2 projects - externals (interfaces + datacontracts) and internals (implementations). For some reason it didn't have an app.config so I added one manually: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name=