Microsoft KB Archive/813770

= When a Page Redirect Launches a Mimetype Player, SRC URL Sometimes Does Not Correctly Set =

Article ID: 813770

Article Last Modified on 8/4/2004

-

APPLIES TO


 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer (Programming) 6.0
 * Microsoft Internet Explorer 6.0 Service Pack 1

-



SYMPTOMS
When a page redirects to a Multipurpose Internet Mail Extensions (MIME) type file extension that launches its registered MIME type player, the Src property that provides the source URL is sometimes not correctly set.



CAUSE
Since the page redirects to the MIME type file, Internet Explorer creates an internal dummy HTML page to handle the redirect and then sets the Src URL. The way that the URL is set depends on the way that you invoke Microsoft Internet Explorer.



RESOLUTION
To work around this behavior, redirect to an HTML page that embeds the target URL. This way the Src URL is set correctly.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Download the sample MimeType.exe.

The following file is available for download from the Microsoft Download Center:

Download the MimeType.exe package now.

MimeType.exe

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

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 to prevent any unauthorized changes to the file. Extract the contents to a folder and then compile the project. This registers the component as the default player for the MIME type associated with the .mtp file extension. Place the Test.mtp on your Web server.  Paste the following code in Microsoft Notepad, and then save the file as Redirect.asp on your Web server. <% Response.Redirect &quot;http:// /test.mtp&quot;%>   You must have no other instances of Internet Explorer open. Start a command prompt, and then type the following command: iexplore.exe http:// /redirect.asp Notice that MIME type player displays the following: File Name: http:// /redirect.asp instead of http:// /test.mtp In this case, the Src URL that Internet Explorer passes to the MIME type player is incorrect.  Start Internet Explorer. Open a command prompt. Type the following command: iexplore.exe http:// /redirect.asp Notice that it displays File Name: http:// /test.mtp. In this case, the Src URL that Internet Explorer passes to the MIME type player is correct.</li> To allow the unsigned ActiveX control to run for the test, you must set the security settings to Low. Remember to restore the security settings after you perform the test.</li></ul>

Steps to Work Around the Behavior
<ul>  Paste the following code in Notepad, and then save it as Embed.htm on your Web server: <body leftmargin=0 topmargin=0 scroll=no> <embed width=100% height=100% fullscreen=yes src=&quot;http:// /test.mtp&quot;> </li>  Open Redirect.asp, and then paste the following code into Redirect.asp: <% Response.Redirect &quot;http:// /embed.htm&quot;%> Now, no matter how you invoke Internet Explorer or how you browse to Redirect.asp, the Src URL correctly sets and the registered MIME type player launches successfully. </li></ul>

Keywords: kbdownload kbbug KB813770

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.