Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Web services may fail on Microsoft Internet Information Services (IIS) 7.5 and Windows 7 Service Pack 1 with .NET Framework 4.0 due to extensionless URL handlers


Symptoms

Consider the following scenario.  You have a Microsoft Windows 7 server running Microsoft Internet Information Services (IIS) and the .NET Framework 4.0.  Your IIS web applications host web services (for example .asmx or WCF-based services) or JSON web services using .aspx page methods.  You install Service Pack 1 for Windows 7.  After installing the service pack, your web applications may begin to suffer from undesirable or unexpected behavior including (but not limited to):
  • Additional internal server-side requests are issued to serve the requested resource. The requested resource is eventually served to the client as expected.
  • The web service processing fails and the application returns an error to the client, or other similar unexpected behavior occurs.

↑ Back to the top


Cause

When Windows 7 SP1 is installed it includes the IIS support for extensionless URLs (please see http://support.microsoft.com/kb/980368 for details of this change that is now included in Windows 7 SP1). Once this support is added, it uncovers problems with applications that rely on PathInfo for processing requests. Web services applications such as .asmx or WCF, or JSON webservices using .aspx page methods, are the most common applications to be affected by this.  


When the initial request URL is issued by the client to the server, it is in a form similar to /MyWebService.asmx/SomeDataForTheService.  When the .NET Framework 4.0 is installed on the server along with Windows 7 SP1, this type of URL is first received and processed by the ASP.NET 4.0 extensionless URL handling logic before the requested web service has a chance to process the request.  The result of this order of operations can include the behavior listed in the Symptoms section of this article.


↑ Back to the top


Resolution

There are two options to choose from to fix this issue.



OPTION 1

Install the .NET Framework 4 GDR Update from the following location: 

Update for Microsoft .NET Framework 4
http://support.microsoft.com/kb/2468871



OPTION 2

To work around this problem without installing the above update, reorder the handlers in the applicationHost.config file so that all three .NET 4.0 extensionless URL handler definitions are near the bottom of the handler mappings section.  Below is an example of the bottom of the reordered handler mappings section with the extensionless URL definitions moved to the bottom of the section.  Note that the example below uses new handler names for the extensionless URL handler entries.  When you move the handler entries in your own applicationHost.config file, you should subsequently rename the handlers using the names shown below – e.g. "ExtensionlessUrlHandler-ISAPI-4.0_32bit", "ExtensionlessUrlHandler-ISAPI-4.0_64bit", and "ExtensionlessUrlHandler-Integrated-4.0".

IMPORTANT: This configuration sample is illustrated for example purposes only and is not meant to be copy and pasted into your configuration file.  It does not contain the entire handlers section of a standard configuration file but instead shows just the pertinent information described in this article.  Always backup your configuration files before making any changes.

<handlers accessPolicy="Read, Script">

< [...unrelated handler mappings...] />

<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />

<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />

<add name="ExtensionlessUrl-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule"
scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32"
responseBufferLimit="0" />

<add name="ExtensionlessUrl-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule"
scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64"
responseBufferLimit="0" />

<add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />

<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
resourceType="Either" requireAccess="Read" />

</handlers>



↑ Back to the top


More Information

Microsoft has confirmed that this is a problem in the products listed in the applies-to section.


↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2520479
Revision : 1
Created on : 1/7/2017
Published on : 3/23/2011
Exists online : False
Views : 128