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

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

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.

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.


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>



MORE INFORMATION

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


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2520479 - Last Review: March 23, 2011 - Revision: 10.0
APPLIES TO
  • Microsoft Internet Information Services 7.5, when used with:
    • Microsoft .NET Framework 4
Keywords: 
KB2520479

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