Your WCF service may stop processing any incoming WCF requests

Background: 1. Suppose we have a WCF service which is using session-full binding like Net.tcp.  We are using the default setting of timeout of  net.tcp bindng . For example: a) OpenTimeout -> 1 minute b) CloseTimeout -> 1 minute c) SendTimeOut-> 1 minute d) ReceiveTimeout -> 10 minute. More details about net.tcp binding timeout setting,…

2

WCF/MSMQ intermittent MQ_ERROR_TRANSACTION_SEQUENCE error

My customer has an application runs fine until upgraded to WCF 4.0. After that, he received follow message intermittently. 0xc00e0051 means MQ_ERROR_TRANSACTION_SEQUENCE.   <Message>An error occurred while receiving a message from the queue: Unrecognized error -1072824239 (0xc00e0051). Ensure that MSMQ is installed and running. Make sure the queue is available to receive from.</Message>   <StackTrace>…

2

Modifying SMSvcHost.exe.config for WCF --- Some common mistakes

  Some WCF services may use net.tcp for high-performance communication. These self-hosted services can control several advanced settings on the service’s transport binding element, such as ListenBacklog and MaxPendingAccepts, which govern the behavior of the underlying TCP socket used for network communication.   When a net.tcp binding enables port sharing (by setting portSharingEnabled =true on…

7

A solution to limit specified client certificates to consume WCF service

Background:   Suppose there is a WCF service which will be consumed by other parties.  The client credential type of this WCF service is configured as certificate. In other word, the WCF consumer must present its client certificate to WCF service for authentication & authorization. This is a typical kind of business –to-business architecture. By…

3

Receive Http 403.3 Forbidden when replace file by WebDav

  Symptoms   Consider the following scenario:   Setup WebDav site in IIS7 and set its physical path(i.e. D:\WebDav\) credential to Specific User iis_webdav in WeDav security configuration. When a user “webdav_testuser” replace a file from client side, you may receive error and IIS logs http 403.3   2012-01-25 00:29:07 10.0.0.1 HEAD /extranet/test.txt – 443…

0

We may experience performance issue when WCF service communicates with STA COM

  Background:   Customer has a WCF service which communicates with a COM developed by VB6.  Customer complains that the performance is poor after it runs for some time, and the WCF response becomes longer and longer. We capture hang dump and found most of WCF worker threads are pending on a call to the…

0

400 bad request when POSTing WebService or WCF request from IE

Symptom   Let’s suppose such a scenario:   Ø  You have a website which enables NTLM authentication. Ø  There’s a virtual directory under this website, which enables Anonymous authentication. Ø  There’s a Web Service or WCF Service in this virtual directory. Ø  You have a web page in the root directory of the website, and…

0

The first WCF call always timed out?

This is a scenario where both the WCF client and service are running in the same AppDomain inside a MVC application. The WC F call originates from MVC controller. In addition, the WCF service host was created in the same function as well. The code looks like:  public ActionResult Index() {             //Create the service…

0

IIS returns 400 “bad request” for WCF service file

This is an IIS hosted WCF service uses basicHttpBinding in NLB environment. The configuration looks like below. It had been worked well for years. <service name=”MyService”>     <endpoint address=”https://NLB_Virtual_Name.Organization.Company.Com/MyService/MyService.svc” binding=”basicHttpBinding”     contract=”IMyService”…./>      <endpoint contract=”IMetadataExchange” binding=”mexHttpBinding” address=”mex” /> </service> After applied .Net 3.5 SP1, IIS returns 400 every time browse to follow URL in browser. https://NLB_Virtual_Name.Organization.Company.Com/MyService/MyService.svc…

1

WCF Exception: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service

Windows authentication is well suited for scenarios in which your users have domain credentials. Using basicHttpBinding with TransportCredentialOnly security mode option, users are authenticated by using Windows authentication. Here is an article described how to implement this. How to: Use basicHttpBinding with Windows Authentication and TransportCredentialOnly in WCF from Windows Forms http://msdn.microsoft.com/en-us/library/ff648505.aspx These two blogs…

2