wcf-performance

Using WebServiceHostFactory Pros & Cons

When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask. What are the benefits of using WebServiceHostFactory? Are there any performance implications to dyn...

Does WCF optimize the client's connection under the hood?

We are currently working on an application that will use a WCF service. The host (the client) is using the excellent WCF Service Proxy Helper from Erwyn van der Meer. What I would like to know... is if I open this object multiple times... will it lead to multiple (expensive) connections or will WCF manage it and pool the connections. T...

How do you determine the values in a binding?

I have defined a binding that I use to connect to two different services. One I call my Master service that provides configuration information to my program and tells it which Local service to connect to. The Local service returns, along with other things, items that allow me to draw map lines and an MP3 as a file stream. The MP3 can...

Performance penalty to running multiple service hosts?

Following on from this question: http://stackoverflow.com/questions/334472/run-wcf-servicehost-with-multiple-contracts Are there any performance penalties from running multiple service hosts as suggested in one of the answers? I am looking at implementing a solution with 4-5 service contracts, and could define one class implementing t...

Renewing a WCF client when SCT has expired?

I am using WCF to a soap endpoint using security mode "TransportWithMessageCredential". The WCF client/server uses SCT (Security Context Token) to maintain a secure connection, and it is working as intended in the general case. However, after a period of inactivity, the SCT will be expired and the next method call will cause a MessageS...

How to change WCF binding of a third party component?

I have a third party application, built with WCF. It is installed as a windows service and it supports wsHttpBinding and basicHttpBinding by default. Is there a way to switch to a more optimized binding such as tcpBinding or named pipes? I will be consuming the service within same server so named pipes is an option. I want to know i...

WCF Memory Performance InstanceContextMode

I've been learning my way around WCF and I've got a question regarding the InstanceContextMode. Correct me if I'm wrong, but the WCF will instantiate your object, then call the service method on it per call by default. You can then set it to be PerSession or Single. It seems to me that it would make more sense to have something betwee...

WCF Binding Performance

I am using basic HTTP binding. Does anybody know which is the best binding in terms of performance as thats the key issue for our site? ...

WCF Protocol Exception

We are getting some weird behavior from a service we have deployed on a remote system which we are using to access and post data to. Retrieving information from the service doesn't seem to be an issue. However, whenever we try to execute insert methods on the service we get an System.ServiceModel.ProtocolException. The weird thing is, ...

WCF performance net.tcp versus namedpipes

What the performance benefit is of switching from net.tcp to named pipes binding? Asking since we have had some problems getting named pipes to work, and therefore wondering if it is worth the effort. Thanks Shiraz ...

asp.net WCF service slow... will disabling asp.net app recycling help?

I have a WCF service that requires a certain response time (under 1 minute). My problem is that every so often, most often in the mornings the service takes a long time to respond (sometimes over 2 minutes). I'm thinking this is because the app has recycled and the first run must recompile. Are there other reasons this might happen? ...

NetNamedPipe: varying response time when communication is idling

I have two WCF apps communicating one-way over named pipes. All is nice, except for one thing: Normally, the request/response cycle takes zero (marginal) time. However, if there was a time span of, say, half a minute without any communication, the request/response increases up to ~300-500ms. I looked around the net and I got the idea of...

WCF readerQuotas settings - drawbacks?

If a WCF service returns a byte array in its response message, there's a chance the data will exceed the default length of 16384 bytes. When this happens, the exception will be something like The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLeng...

WCF comet and threads

Hi, I'm trying to use WCF to implement a comet style server push to an ajax web application. In my WCF service, I've implemented a WaitForEvents method that calls Monitor.Wait to suspend the thread until new data arrives. At that point, the Monitor is pulsed, and the method returns the new data which closes the comet style request. The...

WCF timeout if I add 1 element to an array

Hi, I wrote a test WCF service that returns a string array as long as the parameter of the method. public class XNS_Test : IXNS_Test { public string[] testString(int num) { string[] s = new string[num]; for(int i = 0; i < num; i++) { s[i] = "abcde"; } return s; }} I wrote a Form App to see how much time it takes: privat...

Which collection type should I use for best performance?

While setting WCF client service configuration, there is an option "collection type" which defaults to "System.Array". If I change it to "Generic List", is there any performance loss? ...

Sending WCF messages being delayed under load

When sending messages from a self hosted WCF service to many clients (about 10 or so), sometimes messages are being delayed significantly longer than I'd expect (several seconds to send to a client on local network). Does anyone have an idea why this would be and how to fix it? Some background: the application is a stock ticker style ...

What are the internal limits to WCF

WCF has lots of limits imposed on it to protect against DoS attacks and other developer brainlessness. What are these limits? And how can they be overriden? Specifically, if I was to try to send a large number of messages in a short period of time to a variety of different clients, what are the internal WCF limits they may cause message...

Why does my client send request so slowly?

I have WCF client to send request to a service. And my business code call the client API to send 300+ requests per second. But my client only sends about 50 to service according to te performance counters of my service and WCF ServicePoint. And I have increased ServicePointManager.DefaultConnectionLimit to 1000 in code, and setted maxCo...

WCF Service Throttling settings

Can anyone point to some good atricles on WCF Service Throttling settings to improve performance. I have a per call service with approx 100 users ...