Link to home
Start Free TrialLog in
Avatar of dongji
dongji

asked on

Activex Document on IE4.

I am using VB to create activex document. I found in my laptop, it works fine, the IE4.1 can open the .VBD file. But when I use other people's PC with IE4.2, it can not launch the VBD file. IE can not recognize the VBD file type there.
I also found when I compile the VBD in NT, it does not work for Win95, and vice versa,
Any ideas?
Thanks,
Dongji
Avatar of Low Chew Houng
Low Chew Houng

Microsoft online support has detail explaination on this matter:

PRB: IE Reports Unknown Type .VBD for ActiveX Document
Last reviewed: October 16, 1997
Article ID: Q167380  
The information in this article applies to:
Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0


SYMPTOMS
There are problems with ActiveX Documents that will be used on a web server. The ActiveX Document works fine on the development computer but fails on computers that try to access it over the Internet. The following message sometimes appears:


   "Internet Explorer is opening file of unknown type:
   <Name of Document>.VBD from"

CAUSE
This problem behavior can occur because:


You are using the wrong .VBD file.

You are using an out-dated .VBD file.

The Actxprxy.dll is missing or is not registered properly.

The ActiveX EXE/DLL is not registered properly.

Visual Basic Run-time is not installed or on the path.

The ActiveX Document may not be signed or safe for scripting.

Runtime error in initialization code of ActiveX Document.

Cab files are not being downloaded.

Other problems that occur.

RESOLUTION

Using the wrong .VBD file:
Use the xxx.vbd that is created for you by the Visual Basic Setup Wizard. The Setup Wizard will create a directory of all the files needed for a successful Internet download. Use the files created by Setup Wizard. Do not mix and match these files from other versions on your machine because you will run compatibility issues.


Using an out-dated .VBD file:
The CLSID must be same in the xxx.htm, xxx.vbd, and xxx.exe files of your ActiveX Document project. CLSIDs getting out of synchronization is one of the most common sources of errors for Visual Basic ActiveX Documents. By default, Visual Basic 5.0 creates a new CLSID (and new registry entries) every time you remake your project. Most likely, you will not want this to occur. To preserve the CLSID across builds, do the following:



    - Select the Project menu and the Project Properties items.


    - Select the component tab and select Binary Compatibility, under
      version compatibility.


    - In the text box below that selection, put the DocObject (the .exe or
      .dll, depending upon the ActiveX Document) file name of your project.
If you didn't set Binary Compatibility and rebuild (or directed SetupWiz to rebuild) the project, Visual Basic generated a new CLSID for the same ProgID. When downloading, if IE 3.0x on the client machine sees it is trying to register a different CLSID for the same ProgID, it will create a conflict.X directory under Occache directory. To avoid this problem of the conflict.X directory being created, you need to set Binary Compatibility on your ActiveX Document project unless the project is not backwards compatible.


The Actxprxy.dll is missing or is not registered properly:
If ActiveX DLL works but ActiveX EXE does not, then actxprxy.dll is probably missing or not registered properly. This file is installed by IE3.0X and should be registered. If not, use regsvr32 to register actxprxy.dll.


ActiveX EXE/DLL is not properly registered:
If your ActiveX Document does not show up if you add the .VBD file to Office Binder by selecting the menu item "Section," then item "Add from File," then there is a registry problem or the DocObject can't instantiate. If you can add the .VBD file to Binder, then the .VBD file has the wrong CLSID. Try recompiling and using the .VBD file that is created.


Visual Basic Run-time is not installed or is not on the path:
Make sure MSVBVM50.DLL is correctly installed on your machine.


The ActiveX Document may not be signed or safe for scripting:
Changing the security setting to Medium in the security page of the property settings for IE 3.x may resolve this problem. When you go to the security page, there is Safety Level button where you can change the setting from High to Medium. Once you have changed the security level, you should get messages indicating that a potential security problem exists. Accept all the warnings and your ActiveX Document should work.


Run-time error in initialization code of ActiveX Document:
Make sure you do Run-time error checking in your ActiveX Document project. You will have problems if you have a Run-time error in either of the following routines:



    - Private Sub UserDocument_Initialize()


    - Private Sub UserDocument_InitProperties()
For debugging purposes, put just a MsgBox "In routine XXX" in the above Subs of your ActiveX Document project. This will provide you with some status of the download.


Cab files are not being downloaded.
The inability to download dependent files could also cause this error. Visual Basic provides its core-dependent CAB files on the Visual Basic 5.0 CD-ROM in the tools/cabinets directory. It is important to note that these files are not digitally signed. If users are running IE with High security setting, the files will not be installed on their client machine and the ActiveX Document will not run, yielding the error this article is referring to.

For testing purposes, putting the CAB files shipped on the Visual Basic 5.0 CD-ROM on your WWW/Local server for debugging may be helpful, but be aware that these files have no digital signature. To see what CAB files are being downloaded for your project, open the .inf file that is created for your project by Setup Wizard.

To change the download location while running Setup Wizard:



    - Make sure you select "Use alternate location" from the Run-time
      Components window.


    - Use a fully-qualified path or leave the field blank. If you leave the
      field blank, make sure you put the CAB files in the download
      directory of your project on the server.

Other problems that occur:
A. Set IE 3.0x security to Medium or None.

B. Turn on the version number increment in your document project and put


      the version number in a field so it displays on the main form of your
      downloaded page. This way you can see whether your project actually
      downloaded or you are looking at an old version.


      To change the version number for the Active Document project:


      1. Select the Project menu and the Project Properties items.


      2. Select the make tab.


      3. Under "Version Number," update the version number manually or
         choose the "Auto Increment" check box.

   C. Always close and re-open I/E between component download attempts to
      avoid caching the old page.

   D. For referencing remote objects, use CreateObject for debugging.

   E. Make your ActiveX Doc an EXE rather than a DLL for debugging.

   F. Make sure you are using the latest versions of the controls and DLL's
      that ship with Visual Basic 5.0 in your ActiveX Document. You should
      use MSFlxGrd.ocx that ships with Visual Basic 5.0 instead of
      Grid32.ocx.

   G. Files will not be download if there is a copy of that file loaded in
      the system. When you are downloading, make sure you are only running
      IE 3.0x on your system. This will minimize the chances of a file
      being loaded that your ActiveX Document needs to download.

STATUS
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords          : vb5all kberrmsg kbsetup
Technology        : kbInetDev kbole
Version           : 5.0
Platform          : WINDOWS
Issue type        : kbprb
 

Avatar of dongji

ASKER

Thanks, chewhoung,
Actually It's OK with client with IE4.1. BTW, my compile machine is installed with IE4.1.
When I tested with another PC with VB installed before and IE4.1, it works OK. But
When I test with two IE4.2 PC without VB, it failed. I believe it is something related to registry.
Avatar of dongji

ASKER

I found another PC with IE4.1 same problem.
At the begining, it is said authenticode does not signed.
I think may be I should check with this.
Avatar of dongji

ASKER

ChewChong,
I found the answer. It is because I used several activex controls in this project. I am not quite managed them well with the packaged. You can simply reply this and I will give you
credit. Thanks,
Dongji
ASKER CERTIFIED SOLUTION
Avatar of Low Chew Houng
Low Chew Houng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dongji

ASKER

Can anybody help to delete this message and or move to answered area?
Bought This Question.