FIX: You may receive a 'System.Runtime.InteropServices.COMException' exception when you try to access a WPF application by browsing a Web service

Article translations Article translations
Article ID: 957178 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario. On a computer that has .NET Framework 3.5 Service Pack 1 (SP1) installed, you run an ASP.NET Web service application that is hosted on Internet Information Services (IIS). You use a Windows Presentation Foundation (WPF)-based application to generate content context for the Web Site or Web service, for example, images. In this scenario, when you try to access the WPF application by browsing the Web service, you may receive the following message:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in PresentationCore.dll

Additional information: The program issued a command but the command length is incorrect. (Exception from HRESULT: 0x80070018)

CAUSE

When the WPF application calls the NtRequestWaitReplyPort function to dispatch a message through a local procedure call (LPC) to Windows Manager Session Manager service (UXSMS) in the DwmGetTransportAttributes function, the E_ACCESSDENIED exception is returned. Then, the DwmGetTransportAttributes function tries to decode the message. However, the message was never handled because it is not a valid packet. Therefore, the code returns E_INVALID_COMMAND_LENGTH and triggers the exception.

RESOLUTION

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

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have .NET Framework 3.5 Service Pack 1 installed to apply this hotfix.

Restart requirement

You may have to restart the IIS services. If the files that have to be updated are being used by an application or a service, you may have to restart the computer.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

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.

x86 versions for Windows Server 2000, Windows Server 2003 and Windows XP

Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Wpfgfx_v0300.dll3.0.6920.15001,729,53626- Sep-200805:30x86

x64 versions for Windows Server 2000, Windows Server 2003 and Windows XP

Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Wpfgfx_v0300.dll3.0.6920.15001,729,53626- Sep-200805:30x86
Wpfgfx_v0300.dll3.0.6920.15002,247,68026-Sep- 200802:56x64

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 957178 - Last Review: December 2, 2008 - Revision: 1.1
APPLIES TO
  • Microsoft .NET Framework 3.5 Service Pack 1
Keywords: 
kbhotfixserver kbqfe KB957178

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com