net.tcp

WCF: Net.TCP multiple bindings, same port, different IP Addresses

半世苍凉 提交于 2019-11-29 03:07:28
问题 I've run into a problem. I'm a little new at WCF so any help would be greatly appreaciated. Here's my code: public static void StartHosts() { try { // Create a new host ServiceHost host = new ServiceHost(typeof(ServerTasks)); List<IPAddress> ips = new List<IPAddress>(Dns.GetHostAddresses(Dns.GetHostName())); if (IPAddress.Loopback != null) ips.Add(IPAddress.Loopback); ips.RemoveAll(i => i.AddressFamily != AddressFamily.InterNetwork); foreach (var ip in ips) { string uri = string.Empty; //

How to check the availability of a net.tcp WCF service

人走茶凉 提交于 2019-11-28 19:36:12
My WCF server needs to go up and down on a regular basis, the client sometimes uses the server, but if it is down the client just ignore it. So each time I need to use the server services I check the connection state and if it's not open I open it. The problem is that if I attempt to open while the server is down there is a delay which hits performance. My question is, is there a way to do some kind of myClient.CanOpen() ? so I'd know if there is any point to open the connection to the server. Anderson Imes There is an implementation of WS-Discovery that would allow you to listen for up/down

This could be due to the service endpoint binding not using the HTTP protocol

99封情书 提交于 2019-11-28 15:03:32
问题 I have a WCF Service running fine on my local machine. I put it on the servers, and I am receiving the following error: An error occurred while receiving the HTTP response to http://xx.xx.x.xx:8200/Services/WCFClient.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.] I have gone to the service in the url

How to check the availability of a net.tcp WCF service

前提是你 提交于 2019-11-27 20:33:50
问题 My WCF server needs to go up and down on a regular basis, the client sometimes uses the server, but if it is down the client just ignore it. So each time I need to use the server services I check the connection state and if it's not open I open it. The problem is that if I attempt to open while the server is down there is a delay which hits performance. My question is, is there a way to do some kind of myClient.CanOpen() ? so I'd know if there is any point to open the connection to the server

Detect socket disconnect in WCF

纵饮孤独 提交于 2019-11-27 11:54:49
问题 We're building a WCF server (.NET 4.0). It will only use net.tcp transport. When a client closes the TCP connection, the server gets unhandled CommunicationException, and terminates. Q1. How do I handle the CommunicationException so the server does not terminate and continues serving other clients? Q2. In the handler, how do I get SessionId of the session that was aborted? I need this to do clean up some session-specific data. Thanks in advance! P.S. The connection is over the Internet, so

Could not find a base address that matches scheme net.tcp

穿精又带淫゛_ 提交于 2019-11-27 08:14:52
I have moved my file transfer service from basicHttpBinding to netTcpBinding as I am trying to set up a duplex mode channel. I have also started my net.tcp port sharing service. I am currently in dev and am self hosting on an xp box until we move the app to a dev server. so, for now, I do not have access to IIS. After configuring my service as such: <service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransferService"> <endpoint name="MyFileTransferEP" address = "" binding = "netTcpBinding" bindingConfiguration="MyFileTransferNetTcpEP" behaviorConfiguration=

Setting up WCF TCP service in a web application

為{幸葍}努か 提交于 2019-11-26 19:58:23
问题 I've been battling with this for days, literally going through a hundred articles giving partial guidelines on how to set up a WCF TCP based service in a web application. If someone can help me, I will make this question into a complete guideline. Current status The net.tcp connection works on my development machine. It also works locally after being deployed to a Windows Server 2008 R2. However, it doesn't work remotely, even though it's possible to telnet to port 808 on the server remotely.

Enabling net.tcp in IIS7

守給你的承諾、 提交于 2019-11-26 19:41:33
How can I make IIS handle net.tcp connections? Ronald Wildenberg You need to add net.tcp to the enabled protocols of your site. Go to IIS Manager, right-click on your website, go to 'Manage Web Site' or 'Manage Application', then to 'Advanced Settings...'. There you see 'Enabled Protocols'. It probably says http . Change it to http,net.tcp . If you want to configure bindings, right-click on your website and go to 'Edit Bindings...'. The default net.tcp binding is 808:* . If you want to use WCF services hosted by IIS behind net.tcp, you may also want to check whether you have activated the

Enabling net.tcp in IIS7

混江龙づ霸主 提交于 2019-11-26 07:23:30
问题 How can I make IIS handle net.tcp connections? 回答1: You need to add net.tcp to the enabled protocols of your site. Go to IIS Manager, right-click on your website, go to 'Manage Web Site' or 'Manage Application', then to 'Advanced Settings...'. There you see 'Enabled Protocols'. It probably says http . Change it to http,net.tcp . If you want to configure bindings, right-click on your website and go to 'Edit Bindings...'. The default net.tcp binding is 808:* . If you want to use WCF services