FIX: The paths for images, SiteMap nodes, and the lt;form action=/ gt; tag are rewritten when you use the URL Rewrite Module for IIS 7.0 to rewrite a URL

Article ID: 957660 – Last Review: January 20, 2009 – Revision: 1.0

FIX: The paths for images, SiteMap nodes, and the <form action=/> tag are rewritten when you use the URL Rewrite Module for IIS 7.0 to rewrite a URL

On This Page

SYMPTOMS

Consider the following scenario:

  • You use the Microsoft URL Rewrite Module for Internet Information Services (IIS) 7.0 to rewrite a URL and to run a child request.
  • You use a relative reference in image paths, in a SiteMap node, or in the <form action=/> tag.

In this scenario, the paths for the image, the SiteMap node, and the <form action=/> tag are also rewritten in the same manner as the URL.

For example, consider the following scenario:

  • You have an Article.aspx file and an Image.gif file in the C: wwwroot folder. These files are configured to be available through http://localhost.
  • You configure the URL Rewrite rule for URLs like http://localhost/1/AAA to be rewritten as http://localhost/article.aspx?id=1&title=AAA.
  • You display the Image.gif file on the Article.aspx Web page by using <asp:Image runat=server ImageUrl=Image.gif />.

When you run the request for http://localhost/1/AAA, the URL is rewritten as http://localhost/article.aspx?id=1&title=AAA. Additionally, the path for the image is rendered as http://localhost/1/AAA/Image.gif. This path is incorrect, and you cannot see the image on the page.

RESOLUTION

Download information

The following files are available for download from the MicrosoftDownload Center:

Collapse this imageExpand this image
Download

Download the Microsoft URL Rewrite Module for IIS 7.0 (x86) package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=836778ea-b2f2-4907-b2dc-a152ec0a4bc4&amp;amp;displaylang=en)

Collapse this imageExpand this image
Download

Download the Microsoft URL Rewrite Module for IIS 7.0 (x64) package now. (http://www.microsoft.com/downloads/details.aspx?familyid=6C15B777-8D9E-4D99-B359-A98E2C0880F7&amp;amp;displaylang=en)

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591  (/Feedback.aspx?kbNumber=119591/ ) How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

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 Windows Vista 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 (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 Microsoft .NET Framework 2.0 installed to apply this hotfix.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix 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.

Windows Vista, x86-based versions
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3072 31,560 07-Oct-2008 22:22 x86
Webengine.dll 2.0.50727.3072 436,040 07-Oct-2008 22:22 x86
System.web.dll 2.0.50727.3072 5,242,880 03-Oct-2008 22:23 x86
Windows Vista, x64-based versions
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3072 43,336 07-Oct-2008 23:04 x64
Webengine.dll 2.0.50727.3072 743,240 07-Oct-2008 23:04 x64
System.web.dll 2.0.50727.3072 5,255,168 03-Oct-2008 23:05 x64
Windows Vista, Itanium-based versions
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3072 83,272 07-Oct-2008 23:12 IA-64
Webengine.dll 2.0.50727.3072 1,227,080 07-Oct-2008 23:12 IA-64
System.web.dll 2.0.50727.3072 4,771,840 03-Oct-2008 23:14 IA-64

WORKAROUND

To work around this problem, you can use the absolute address when you refer to the resource. For the example that is described in the Symptoms section, you can modify the ImageUrl property from Image.gif to /Image.gif or ~/Image.gif.

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 the Microsoft URL Rewrite Module for IIS 7.0, visit the following Microsoft Web site:

http://learn.iis.net/page.aspx/460/using-url-rewrite-module/ (http://learn.iis.net/page.aspx/460/using-url-rewrite-module/)

APPLIES TO
  • Microsoft .NET Framework 2.0
Keywords: 
kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB957660

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image