PRB: Visual Basic UserDocuments are Displayed as Garbage TextID: Q172063
|
When the UserDocument files are placed on a UNIX or NetScape Web server, Internet Explorer (IE) will fail to display the UserDocument correctly. IE will interpret the raw binary data of the .VBD as text and will display a series of random (garbage) characters, including boxes or symbols.
This occurs because some Web servers often associate the incorrect content
type, or MIME type, with files whose extensions are unrecognized.
.VBD files are binary files that contain the persistent properties that are
exported by the UserDocument. When Internet Explorer downloads these files,
it must know to treat them as binary files, not as text files.
Some Web servers will, by default, associate all files whose extensions are
unrecognized with the content type "text/plain." Because .VBD is not a
commonly used file-extension, .VBD files on problem servers will often get
branded as "text/plain."
When Internet Explorer receives the "text/plain" content type HTTP header,
it will attempt to display the .VBD file as a text file. This results in
the garbage characters that appear in the window. When it receives the
"application/octet-stream" content type instead, it saves the .VBD file
into the Internet Explorer cache and then activates the associated Visual
Basic UserDocument for that .VBD file.
This problem will not occur on Microsoft Internet Information Server (IIS)
because it associates all files with unrecognized file extensions with the
content type "application/octet-stream."
There are two possible ways to avoid this problem on Web servers that cause
this problem:
This behavior is by design.
"Active Document" is the term for what was once called an "ActiveX Document." When this article refers to a "UserDocument," this is taken to mean the Visual Basic 5.0 technology that allows Visual Basic forms to be hosted as Active Documents in Active Document containers such as Internet Explorer.
Additional query words: kbdsi kbDSupport kbVBp kbVBp500 kbVBp600 kbActiveX kbInternet
Keywords :
Version :
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: June 14, 1999