nettcpbinding

Detecting Client Death in WCF Duplex Contracts

倾然丶 夕夏残阳落幕 提交于 2019-12-17 07:08:05
问题 I'm trying to build a SOA where clients can perform long running queries on the server and the server responds using a callback. I'd like to be able to detect if the client disconnects (through user initiated shutdown, unhandled exception or loss of network connectivity) so that the server can choose to cancel the expensive request. I'm testing a variety of failure cases but I can't seem to get certain event handlers to fire. Tested Failure Cases: Killing the Client Process After the request.

How to pass an Excel file from a WinForms client to a WCF service and into an SQL Server table?

大憨熊 提交于 2019-12-13 09:37:32
问题 How to pass an Excel file from a WinForms client to a WCF service and into an SQL Server table? Can anyone provide any guidance, code, or advice? WCF service contract and implementation that will take an Excel file as a parameter Contract implementation should insert that Excel file into a varbinary(MAX) column in SQL Server. 回答1: Here is a post that addresses the WCF portion of your question. Once you get the file to the server you can use FileHelpers.net to parse that file into an object. I

WCF Client TCP Error 10013 while connecting - only if connection to windows DC is present; net.tcp binding

核能气质少年 提交于 2019-12-13 05:49:23
问题 I set up a small WCF service in Duplex mode. The service is consumed within a Windows 8 App. The client computer is member of a Windows Domain. If the connection to the Domaincontroller is present, I get an Error: TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions This does not happen if the connection to the DC is established but the server and client are running on the same machine. Over a network connection however it fails. Strangely,

When does WCF NetTcpBinding need full trust on the client?

百般思念 提交于 2019-12-12 09:54:04
问题 I'm using WCF to communicate to several servers. For my local server netTcpBinding works like expected, no problems. But when I try to connect to my remote server (Azure) using the following netTcpBinding in app.config , this will crash the application on initialization since the netTcpBinding can't be created without full trust. This binding in the app.config file, <bindings> <netTcpBinding> <binding name="NetTcpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout=

Is it possible create a scalable WCF service with thousands of long-running TCP connections?

早过忘川 提交于 2019-12-12 08:13:34
问题 I'm attempting to create a WCF service where several thousand (~10,000) clients can connect via a duplex NetTcpBinding for extended periods of time (weeks, maybe months). After a bit of reading, it looks like it's better to host in IIS than a custom application or Windows service. Is using WCF for such a service acceptable, or even possible? If so, where can I expect to run into throttling or performance issues, such as increasing the WCF ListenBacklog & MaxConcurrentConnections? Thanks! 回答1:

WCF net.tcp server disconnects - how to handle properly on client side?

橙三吉。 提交于 2019-12-12 05:39:10
问题 I'm stuck with a bit of an annoying problem right now. I've got a Silverlight 4 application (which runs OOB by default). It uses WCF with net.tcp as means of communicating with the server. The client uses a central instance of the wcf client proxy. As long as everything keeps running on the server side, everything's fine. If i kill the server in the middle of everything, i drown in an avalanche of exceptions on the client side (connection lost, channel faulted etc etc). Now i'm looking for a

How to setup WCF Net.Tcp

爱⌒轻易说出口 提交于 2019-12-11 13:39:04
问题 I'm trying to setup a wcf service to use net.tcp over IIS 7. Here is the error I get: There was no endpoint listening at net.tcp://127.0.0.1:8000/ListingService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Here is the code I call from the client: using (var client = new ListingServiceClient("NetTcpBinding")) { client.Test(); client.Close(); } Here is my services web.config - http://pastebin.com

Restricting WCF TCP endpoint to Administrators

筅森魡賤 提交于 2019-12-11 09:48:12
问题 How do I restrict access of a remotely-accessible WCF endpoint to a local/domain administrator ? Edit: After adding [PrincipalPermission(SecurityAction.Demand, Name = "AdminUser")] to my WCF channel method implementation, trying to call the service method from my client throws a SecurityAccessDeniedException , which is progress. How do I let Windows prompt the user for new user details (or a security token) so I can reinitiate the WCF connection as the correct user? 回答1: You can do this with

net.tcp binding with streamed transfer mode = Framing mode Singleton is not supported

此生再无相见时 提交于 2019-12-11 07:43:57
问题 I'm trying to implement a fire-and-forget pattern in a WCF method. I have this working in my local environment, but running into an issue when running on IIS7. I'm using net.tcp binding, and discovered that even when using a one-way call with this binding, closing the proxy will block the UI (in this case an asp.net website) until the operation completes. I changed the transfer mode to streamed so that closing the proxy will not cause a wait, as suggested in this article. As I mentioned, this

WCF with tcp.net binding testing with JMeter

无人久伴 提交于 2019-12-11 06:12:10
问题 I have a problem that in JMeter I can setup server / port, but my application is hosting on IIS 7.5 and WCF service is a "Application" under specific web site. So the service endpoint is http://localhost:8002/Some.Aplication/Some.Application.svc WCF application is supporting tcp.net binding also and I should use it(tcp.net). Ho can I set up JMeter for sending specific packet over tcp to this endpoint ? Thanks. 回答1: You need to use TCP Sampler, and probably write a custom TCPClient class for