Microsoft Knowledge Base Email Alertz

(266263) - When using the Multipurpose Internet Mail Extensions (MIME) content type in ASP to stream either a Microsoft Word 2000 or Microsoft Excel 2000 document, the client may receive either a blank document, static HTML, or the ASP source code rather than...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

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

BUG: Word 2000 and Excel 2000 Display ASP Source When Using MIME Type to Stream Data

Article ID: 266263 - View products that this article applies to.
This article was previously published under Q266263

On This Page

SYMPTOMS

When using the Multipurpose Internet Mail Extensions (MIME) content type in ASP to stream either a Microsoft Word 2000 or Microsoft Excel 2000 document, the client may receive either a blank document, static HTML, or the ASP source code rather than the intended document.

CAUSE

When navigating to a page that displays MIME content, Internet Explorer passes the URL of the page to the Office application to retrieve the data. Because Word 2000 and Excel 2000 can directly read content from an HTTP server, the application downloads and displays the physical ASP file that is specified in the URL instead of displaying the results of the ASP page as you would expect. This can result in either a blank document, static HTML, or the ASP source being displayed.

The blank document and static HTML situations are related. The server retrieves the file and tries to parse the HTML data, which removes all the ASP code and leaves the static HTML. If your ASP code does not contain any static HTML, you receive a blank page. Otherwise, you just see the static HTML, and possibly part of the ASP code.

The problem only occurs if your client system has write permissions to the ASP file on the Web server. If the client does not have write permissions, Office 2000 defaults to the Office 97 behavior and to an HTTP GET on the file.

STATUS

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

The problem has been corrected in SR1 for Office 2000. You can download the service pack from the following Web address:
http://office.microsoft.com

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Notepad.
  2. Paste the following code into Notepad:
    <%@ Language=VBScript %> 
    <% 
    Response.Buffer = TRUE 
    Response.ContentType = "application/vnd.ms-excel" 
    %> 
    <HTML> 
    <BODY> 
    <% Response.Write("This does not show up in Excel") %> 
    </BODY> 
    </HTML> 
    					
  3. Save the file to a virtual directory on your Web server. Name the file MIMETest.asp.
  4. Close Notepad and start Internet Explorer.
  5. In the Address bar, type http://<server>/<vdir>/MIMETest.ASP, where <server> is your Web server name and <vdir> is the virtual directory in which you placed the HTML file. If the client has write permissions to the file, you see either a blank page or the ASP script source code.

REFERENCES

For additional information on similar issues with Office 2000 and ASP, click the article numbers below to view the articles in the Microsoft Knowledge Base:
247318 BUG: Word 2000 and Excel 2000 Do Not Redirect Correctly When Using Response.Redirect
225234 OFF2000: Link to Office Document Produces Password Prompt

Properties

Article ID: 266263 - Last Review: August 9, 2004 - Revision: 4.3
APPLIES TO
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Word 2000
  • Microsoft Active Server Pages 4.0
Keywords: 
kbdownload kbbug kbfix KB266263
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate