FIX: A .NET Framework 3.0-based WCF service may crash with a System.ServiceModel.CommunicationException exception if the service uses the netTcpBinding binding

Applies To
.NET Framework 3.5 Service Pack 1 Windows Server 2008 R2 Service Pack 1

Symptoms

You run a Microsoft .NET Framework 3.0-based Windows Communication Foundation (WCF) service that uses the netTcpBinding binding. When a transient network error occurs, the service crashes because of a System.ServiceModel.CommunicationException exception. The exception may occur because of time-out or because of an underlying network resource issue.

The stack trace may resemble the following example:


at System.ServiceModel.Channels.SecurityChannelListener`1.DuplexSessionReceiveMessageAndVerifySecurityAsyncResult.BeginTryReceiveItem(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.StartInnerReceive()
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.Start()
at System.ServiceModel.Channels.SecurityChannelListener`1.DuplexSessionReceiveMessageAndVerifySecurityAsyncResult.ReceiveMessage(Object state)
at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)

Cause

This issue occurs because the ReceiveMessage method in the DuplexSessionReceiveMessageAndVerifySecurityAsyncResult object does not catch exceptions that are caused by the error, and they are transferred to the user thread.

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

http:⁠//support.microsoft.com/contactus/?ws=support Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

You must have the Microsoft .NET Framework 3.5 Service Pack 1 (SP1) installed on one of the following Windows operating systems to apply this hotfix:

  • Windows Vista Service Pack 2 (SP2)
  • Windows Server 2008 Service Pack 2 (SP2)
  • Windows 7 Service Pack 1 (SP1)
  • Windows Server 2008 R2 Service Pack 1 (SP1)

For more information about how to obtain a Windows Vista service pack, click the following article number to view the article in the Microsoft Knowledge Base:

935791 How to obtain the latest Windows Vista service packFor more information about how to obtain a Windows Server 2008 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

968849 How to obtain the latest service pack for Windows Server 2008For more information about how to obtain Service Pack 1 for Windows 7 or for Windows Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:

976932 Information about Service Pack 1 for Windows 7 and for Windows Server 2008 R2

Restart information

You may have to restart the computer after you apply this hotfix if any affected files are being used. We recommend that you exit all .NET Framework applications before you apply this hotfix to avoid having to restart the computer.

Replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

For all supported x86-based versions of Windows Vista SP2 and of Windows Server 2008 SP2

File name File version File size Date Time Platform
Smdiagnostics.dll 3.0.4506.5721 110,592 23-Aug- 2011 10:57 x86
Smsvchost.exe 3.0.4506.5721 128,848 23-Aug-2011 10:57 x86
System.identitymodel.dll 3.0.4506.5721 442,368 23 -Aug-2011 10:57 x86
System.runtime.serialization.dll 3.0.4506.5721 970,752 23-Aug- 2011 10:57 x86
System.runtime.serialization.dll 3.0.4506.5721 970,752 23-Aug- 2011 10:57 x86
System.servicemodel.dll 3.0.4506.5721 5,992,448 23-Aug- 2011 10:57 x86
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 23-Aug- 2011 10:57 x86
System.servicemodel.dll 3.0.4506.5721 5,992,448 23-Aug-2011 10:57 x86
Servicemodel.mof Not Applicable 85,113 28-Jul-2011 10:57 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 12-Aug-2010 14:24 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 17,256 23-Aug-2011 10:57 x86
System.identitymodel.dll 3.0.4506.5721 442,368 23-Aug- 2011 10:57 x86
System.runtime.serialization.dll 3.0.4506.5721 970,752 23-Aug- 2011 10:57 x86
System.servicemodel.dll 3.0.4506.5721 5,992,448 23-Aug-2011 10:57 x86

For all supported x64-based versions of Windows Vista SP2 and of Windows Server 2008 SP2

File name File version File size Date Time Platform
Servicemodel.mof Not Applicable 85,113 28-Jul-2011 10:55 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 12-Aug-2010 14:10 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 19,304 23-Aug-2011 10:55 x64
Smdiagnostics.dll 3.0.4506.5721 94,208 23-Aug- 2011 10:55 x64
Smsvchost.exe 3.0.4506.5721 116,560 23-Aug-2011 10:55 x64
System.identitymodel.dll 3.0.4506.5721 401,408 23 -Aug-2011 10:55 x64
System.runtime.serialization.dll 3.0.4506.5721 847,872 23-Aug- 2011 10:55 x64
System.runtime.serialization.dll 3.0.4506.5721 847,872 23-Aug- 2011 10:55 x64
System.servicemodel.dll 3.0.4506.5721 5,332,992 23-Aug- 2011 10:55 x64
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 23-Aug- 2011 10:55 x64
System.servicemodel.dll 3.0.4506.5721 5,332,992 23-Aug-2011 10:55 x64

For all supported IA-64-based versions of Windows Server 2008 SP2

File name File version File size Date Time Platform
Servicemodel.mof Not Applicable 85,113 28-Jul-2011 11:26 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 16-Aug-2010 14:36 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 33,640 23-Aug-2011 11:24 IA-64
Smdiagnostics.dll 3.0.4506.5721 94,208 23-Aug- 2011 11:24 IA-64
Smsvchost.exe 3.0.4506.5721 116,560 23-Aug-2011 11:24 IA- 64
System.identitymodel.dll 3.0.4506.5721 401,408 23-Aug-2011 11:24 IA-64
System.runtime.serialization.dll 3.0.4506.5721 847,872 23-Aug- 2011 11:24 IA-64
System.runtime.serialization.dll 3.0.4506.5721 847,872 23-Aug-2011 11:24 IA- 64
System.servicemodel.dll 3.0.4506.5721 5,332,992 23-Aug-2011 11:24 IA-64
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 23-Aug- 2011 11:24 IA-64
System.servicemodel.dll 3.0.4506.5721 5,332,992 23-Aug-2011 11:24 IA-64

For all supported x86-based versions of Windows 7 SP1

File name File version File size Date Time Platform
Smdiagnostics.dll 3.0.4506.5721 110,592 22-Aug-2011 22:36 x86
Smsvchost.exe 3.0.4506.5721 128,848 22-Aug-2011 22:36 x86
System.identitymodel.dll 3.0.4506.5721 442,368 22-Aug-2011 22:36 x86
System.runtime.serialization.dll 3.0.4506.5721 970,752 22-Aug-2011 22:36 x86
System.servicemodel.dll 3.0.4506.5721 5,992,448 22-Aug-2011 22:36 x86
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 22-Aug-2011 22:36 x86
Servicemodel.mof Not Applicable 85,113 12-Nov-2010 23:36 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 10-Jun-2009 21:14 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 17,256 22-Aug-2011 22:36 x86
System.identitymodel.dll 3.0.4506.5721 442,368 22-Aug-2011 22:36 x86

For all supported x64-based versions of Windows 7 SP1 and Windows Server 2008 R2 SP1

File name File version File size Date Time Platform
Servicemodel.mof Not Applicable 85,113 12-Nov-2010 23:39 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 10-Jun-2009 20:30 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 19,304 22-Aug-2011 22:31 x64
Smdiagnostics.dll 3.0.4506.5721 94,208 22-Aug-2011 22:31 x64
Smsvchost.exe 3.0.4506.5721 116,560 22-Aug-2011 22:31 x64
System.identitymodel.dll 3.0.4506.5721 401,408 22-Aug-2011 22:31 x64
System.runtime.serialization.dll 3.0.4506.5721 847,872 22-Aug-2011 22:31 x64
System.servicemodel.dll 3.0.4506.5721 5,332,992 22-Aug-2011 22:31 x64
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 22-Aug-2011 22:31 x64

For all supported IA-64-based versions of Windows Server 2008 R2 SP1

File name File version File size Date Time Platform
Servicemodel.mof Not Applicable 85,113 12-Nov-2010 23:40 Not Applicable
Servicemodel.mof.uninstall Not Applicable 896 10-Jun-2009 20:35 Not Applicable
Servicemonikersupport.dll 3.0.4506.5721 33,640 22-Aug-2011 22:25 IA-64
Smdiagnostics.dll 3.0.4506.5721 94,208 22-Aug-2011 22:25 IA-64
Smsvchost.exe 3.0.4506.5721 116,560 22-Aug-2011 22:25 IA-64
System.identitymodel.dll 3.0.4506.5721 401,408 22-Aug-2011 22:25 IA-64
System.runtime.serialization.dll 3.0.4506.5721 847,872 22-Aug-2011 22:25 IA-64
System.servicemodel.dll 3.0.4506.5721 5,332,992 22-Aug-2011 22:25 IA-64
System.servicemodel.washosting.dll 3.0.4506.5721 32,768 22-Aug-2011 22:25 IA-64

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates