FIX: Error message when a client application that is built on the .NET Framework 2.0 sends a request to a server that is running Windows Communication Foundation: "HTTP/1.1 500 Internal Server Error"

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

On This Page

SYMPTOMS

When a client application that is built on the Microsoft .NET Framework 2.0 sends a request to a server that is running Microsoft Windows Communication Foundation (WCF), the server returns an HTTP 500 error message that resembles the following:
HTTP/1.1 500 Internal Server Error Content-Length: 0
This problem occurs if the following conditions are true:
  • The server receives an HTTP request, and the server returns the results as Plain Old XML (POX).
  • The request that the client application sends does not use a host header.

CAUSE

This problem occurs because the server uses the HttpListenerRequest object to describe the incoming request from the client application. When the request does not use a host header, the returned value of the Uri object in the HttpListenerRequest object is the NULL value.

RESOLUTION

Hotfix information

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 .NET Framework 2.0 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 the .NET Framework 2.0 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Microsoft.jscript.dll8.0.50727.898749,56828-Jun-200719:30x86
System.dll2.0.50727.8982,940,92828-Jun-200719:30x86

STATUS

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

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

Call stack information

When this problem occurs, the following call stack is generated:
0:003> r
eax=50df29ec ebx=00fbf87c ecx=00000000 edx=013e0a84 esi=013fbfc4 edi=013fbfc4
eip=5088566b esp=00fbf790 ebp=00fbf7c8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206
System_ServiceModel_ni!System.ServiceModel.Channels.BaseUriWithWildcard.GetHashCode()+0x7:
5088566b 3909            cmp     dword ptr [ecx],ecx  ds:0023:00000000=????????

0:003> kpL500
ChildEBP RetAddr  
00fbf7c8 508855a8 System_ServiceModel_ni!System.ServiceModel.Channels.BaseUriWithWildcard.GetHashCode(<HRESULT 0x80004001>)+0x7
00fbf7c8 50929c15 System_ServiceModel_ni!System.ServiceModel.Channels.BaseUriWithWildcard.Equals(<HRESULT 0x80004001>)+0x28
00fbf7c8 5092ae80 System_ServiceModel_ni!System.ServiceModel.Channels.MruCache`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].TryGetValue(<HRESULT 0x80004001>)+0x35
00fbf7ec 5092af47 System_ServiceModel_ni!System.ServiceModel.Channels.UriPrefixTable`1[[System.__Canon, mscorlib]].TryCacheLookup(<HRESULT 0x80004001>)+0x2c
00fbf82c 508e6e54 System_ServiceModel_ni!System.ServiceModel.Channels.UriPrefixTable`1[[System.__Canon, mscorlib]].TryLookupUri(<HRESULT 0x80004001>)+0x57
00fbf868 50912ee8 System_ServiceModel_ni!System.ServiceModel.Channels.HttpTransportManager.TryLookupUri(<HRESULT 0x80004001>)+0xb0
00fbf8a0 7a571b3d System_ServiceModel_ni!System.ServiceModel.Channels.SharedHttpTransportManager.SelectAuthenticationScheme(<HRESULT 0x80004001>)+0x3c
00fbfa58 7a5bd6ae System_ni!System.Net.HttpListener.HandleAuthentication(<HRESULT 0x80004001>)+0x2c5
00fbfa98 793d6ac4 System_ni!System.Net.ListenerAsyncResult.WaitCallback(<HRESULT 0x80004001>)+0xca
00fbfab8 79e88f63 mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(<HRESULT 0x80004001>)+0x68
00fbfacc 79e88ee4 mscorwks!CallDescrWorker(unsigned long pSrcEnd = 0xfbfc80, unsigned long numStackSlots = 1, unsigned long pArgumentRegisters = 0xfbfc74, unsigned long fpRetSize = 0, unsigned long pTarget = 0x793d6a5c)+0x33
00fbfb4c 79f20212 mscorwks!CallDescrWorkerWithHandler(void * pSrcEnd = 0x00fbfc80, unsigned int numStackSlots = 1, struct ArgumentRegisters * pArgumentRegisters = 0x00fbfc74, unsigned int fpReturnSize = 0, void * pTarget = 0x793d6a5c, int fCriticalCall = 0)+0xa3
00fbfb6c 79f201bc mscorwks!DispatchCallBody(unsigned long * pSrc = 0x00fbfc7c, unsigned long numStackSlotsToCopy = 1, unsigned long * pRegisterArgs = 0x00fbfc74, unsigned int64 uRegTypeMap = 0, void * pvRetBuff = 0x00000000, unsigned int64 cbRetBuff = 0, unsigned int fpRetSize = 0, unsigned char * pTargetAddress = 0x793d6a5c "U???")+0x1e
00fbfbd0 79f2024b mscorwks!DispatchCallDebuggerWrapper(unsigned long * pSrc = 0x00fbfc7c, unsigned long numStackSlotsToCopy = 1, unsigned long * pRegisterArgs = 0x00fbfc74, unsigned int64 uRegTypeMap = 0, void * pvRetBuff = 0x00000000, unsigned int64 cbRetBuff = 0, unsigned int fpRetSize = 0, unsigned char * pTargetAddress = 0x793d6a5c "U???", class ContextTransitionFrame * pFrame = 0x00000000)+0x3d
00fbfc04 7a07bebf mscorwks!DispatchCallNoEH(unsigned long * pSrc = 0x00fbfc7c, unsigned long numStackSlotsToCopy = 1, unsigned long * pRegisterArgs = 0x00fbfc74, unsigned int64 uRegTypeMap = 0, void * pvRetBuff = 0x00000000, unsigned int64 cbRetBuff = 0, unsigned int fpRetSize = 0, unsigned char * pTargetAddress = 0x793d6a5c "U???")+0x51
00fbfcac 79ecb4a4 mscorwks!BindIoCompletionCallBack_Worker(void * args = 0x013d4920)+0x123
00fbfcbc 79ecb442 mscorwks!ManagedThreadBase_DispatchInner(struct ManagedThreadCallState * pCallState = 0x79ecb364)+0x4d
00fbfd50 79ecb364 mscorwks!ManagedThreadBase_DispatchMiddle(struct ManagedThreadCallState * pCallState = 0x00fbfd98)+0xb0
00fbfd8c 7a0e1b7e mscorwks!ManagedThreadBase_DispatchOuter(struct ManagedThreadCallState * pCallState = 0x00fbfd98)+0x6d
00fbfdb4 7a0e1bab mscorwks!ManagedThreadBase_FullTransitionWithAD(struct ADID pAppDomain = struct ADID, <function> * pTarget = 0x7a07bdfe, void * args = 0x00fbfdec, UnhandledExceptionLocation filterType = ThreadPoolThread (4))+0x25
00fbfdc8 7a07c031 mscorwks!ManagedThreadBase::ThreadPool(struct ADID pAppDomain = struct ADID, <function> * pTarget = 0x00000000, void * args = 0x00000244)+0x13
00fbfe1c 7a07c063 mscorwks!BindIoCompletionCallbackStubEx(unsigned long ErrorCode = 0, unsigned long numBytesTransferred = 0x244, struct _OVERLAPPED * lpOverlapped = 0x013d494c, int setStack = 1)+0x8c
00fbfe30 79f2f3b0 mscorwks!BindIoCompletionCallbackStub(unsigned long ErrorCode = 0x880b220, unsigned long numBytesTransferred = 1, struct _OVERLAPPED * lpOverlapped = 0x00fbfc48)+0x13
00fbfe94 79ecb00b mscorwks!ThreadpoolMgr::CompletionPortThreadStart(void * lpArgs = 0x0880b220)+0x406
00fbffb8 77e6608b mscorwks!Thread::intermediateThreadProc(void * arg = 0x001aa600)+0x49
00fbffec 00000000 kernel32!BaseThreadStart(<function> * lpStartAddress = 0x79ecafc5, void * lpParameter = 0x001aa600)+0x34

Properties

Article ID: 939670 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 2.0
Keywords: 
kbfix kbexpertiseadvanced kbqfe KB939670

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