When a Page Redirect Launches a Mimetype Player, SRC URL Sometimes Does Not Correctly Set (813770)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.01
  • Microsoft Internet Explorer (Programming) 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.

MORE INFORMATION

Steps to Reproduce the Behavior

  • Download the sample MimeType.exe.

    The following file is available for download from the Microsoft Download Center:
    DownloadDownload the MimeType.exe package now. 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 "http://<server>/test.mtp"%>
  • You must have no other instances of Internet Explorer open. Start a command prompt, and then type the following command:
    iexplore.exe http://<server>/redirect.asp
    Notice that MIME type player displays the following: File Name: http://<server>/redirect.asp instead of http://<server>/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://<server>/redirect.aspNotice that it displays File Name: http://<server>/test.mtp. In this case, the Src URL that Internet Explorer passes to the MIME type player is correct.
  • 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.

Steps to Work Around the Behavior

  • Paste the following code in Notepad, and then save it as Embed.htm on your Web server:
    <html><body leftmargin=0 topmargin=0 scroll=no> 
    <embed width=100% height=100% fullscreen=yes src="http://<server>/test.mtp">
    </body>
    </html>
    
  • Open Redirect.asp, and then paste the following code into Redirect.asp:
    <% Response.Redirect "http://<server>/embed.htm"%>
    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.

Modification Type:MinorLast Reviewed:8/4/2004
Keywords:kbdownload kbbug KB813770 kbAudDeveloper