In order to solve the ActiveForm's use IE cannot download the problem online, it is recommended that there is a problem with problems in this area, maybe help, the article will make the steps and processes of IE to download ActiveX controls. Detailed narrative, there is a certain help for those who have been able to download successfully.
Because of time, I haven't been translated, please forgive
Diagnosing Code Download Problems
By Conrad Herrmann 25 July 1997 So you've just build a nifty new ActiveX control or ActiveForm, and you're eager to test it out in the field. You type in the information into the Delphi's Web Deployment options dialog and select the Web Deploy command. Then you go to your coworker's machine-one on which neither your control nor Delphi have ever been installed-and you go to the test web page Borland's deployment Wizard generates. After a second or two, your heart jumps as you see the magic Words Appear:
Delphi ActiveX Test Page
You Should See Your Control Appear Below this Line:
A Bit More Crunching, And The Screen Looks Like this:
You've just been given the Big Red X-an indication that the Internet Explorer was unable to download or create your control. What happened, and how can you fix it? Any number of errors could have occurred, but Internet Explorer suppresses all the error messages making it frustratingly difficult to diagnose failures. This is a usability feature. The idea is that the Internet Explorer should not pop up error messages that the user is not capable of dealing with anyway, and most end-users can not tell the difference between an Authenticode security violation and the Start button. So, your control's users will be happy and ignorant-who cares if you get a bald patch prematurely? This paper presents an overview of the code download process Internet Explorer uses to retrieve and Install your control, and presents a diagnostic schema for analyzing what's wrong in your installation.
The downline process
In order to create your control in the web browser, Internet Explorer must hav received an HTML file containing an tag This tag contains parameters that dictate the first steps in the download process For example:..
ClassID = "CLSID: 29D37F03-F02F-11D0-ACB2-0080C7316F20"
Codebase = "http://www.xyz.com/mycontrol.ocx#version=1, 0, 1, 0"
Width = 350
HEIGHT = 250
Align = center
HSPACE = 0
vSpace = 0
Object
The #version part of the tag is optional-if missing, it means "any version will do." The version tag must not appear if the client is the Netscape Navigator with the NCompass ActiveX plugin. On the web server, there will be a file called MyControl.htm (many servers are case sensitive), which has been stamped with a version tag (presumably 1.0.1.0), and which can create an ActiveX control with the specified ClassID. The first thing Internet Explorer does is to determine if the specified ClassID is already installed on the client machine. If it is, IE will check to see if the installed version matches the requested version. If the local version matches the version requested in the HTML, IE will simply use the local copy to create the control. If the version number requested by the HTML page is newer than the one currently installed, or the ClassID is not yet installed, IE knows it must download and install the codebase before it can create the control.
Download and Install Steps
Downloading and Installing The CodeBase Involves Three Basic Steps:
Copy the code base onto the local machine's Windows / OCCache directory or a subdirectory of it. Check the code signature of the codebase, and Install the codebase. If this process completes successfully, the machine should have a correctly registered OCX library from which the control Can Be created.copying the codebase
The first step, copying the control to the local machine, will be done by attempting to retrieve the file by the mechanism that the codebase URI specifies. If the URI says use HTTP (the default), then IE will use HTTP to download the control . You can also specify FTP, or FILE URIs. This step can fail in a nuber of ways-if the remote server can not be found, if the local disk is out of disk space, if the codebase name is spelled incorrectly (remember Many Servers Are Case-Sensitive, etc. You can Simulate this Step by Typing The Uri Into The IE Address Box. IE SHOULD RESPOND WIO You Want To Open IT or Save IT? "
-if you choose Save It and type / windows / occache as the directory, then this should yield exactly the same results. In the case of a connection failure or File not Found error, you will know that the URI path points to a server or a file that can not be found. If this happenes, you may have forgotten to deploy your file to the server, or you may have typed the codebase's URI incorrectly. This step is the only step that gives you visual feedback, and it only does so if you've got a quick eye or a slow modem. When IE is downloading the codebase, you'll see the IE's download-progress meter (in the status bar) moving from left to right. If the status meter stays at 0%, then there is probably a connection problem. If the progress meter moves all the way across to the right, then the codebase probably was correctly copied to your machine, and the problem lies at a later stage. One problem that often happens if You're debugging and testing on your development machine is this you've left the co ntrol open in the IE browser. While your control is running, the DLL file itself is locked, so the code download process will not be able to overwrite this file. Remember that IE caches the last few pages you looked at, so even if the current page is not the one with your ActiveX on it, you might still have the OCX locked. Exiting IE is the only sure way to know that IE releases the lock on the DLL file.Checking Authenticode Signature
In the second step, IE checks the code signature of your control. The kinds of errors that can occur depend on the security settings in your IE installation. If you have security set to High, IE will refuse to install the control if it hasn ' t been code-signed, and will fail silently. If security is set to Medium, IE will show a warning dialog that reads "This component has not been digitally signed by its publisher. Do you wish to continue?" When security is set to low, IE will not check for a code signature at all, and will proceed to the Installation phase. When security is set to Medium or High, and IE validates the code signature on your codebase, it will display the telltale certificate dialog which indicates it was able to verify the certificate. This dialog allows you to summarily accept all code from the specified vendor, and if the vendor already appears on this list then the certificate dialog will not be shown. If you're working with unsigned controls, setting Security to Mediu Mi Rather Than Low Can Give You a Use 'SHAPPENING, IF You're Working with An Unsigned Control. If The "this Component Has Not Been Digitally Signed by Its Publisher"
does not appear, the control's codebase was not downloaded successfully-either because IE failed to download it, or because IE decided it did not need to be downloaded. There also can be problems with code signature verification if you have not upgraded to Authenticode 2.0 . You should make sure to upgrade your development machine to Authenticode 2.0 at the Microsoft web site. Success? Failure? Which is it? Telling whether the second step (Authenticode) succeeded or not can sometimes be difficult because there are situations where both success and . failure proceed silently The two cases where success announces itself are:. Medium security setting, unsigned control, yields the "unsigned control" dialog box Medium or high security setting, no summary accept from your vendor, yields the certificate dialog.
Installing the codebase
The third step is installing the codebase that was just downloaded to your machine's WINDOWS / OCCACHE directory. How the codebase is installed depends on which kind of codebase you have. The type of codebase is determined by the CODEBASE tag in the OBJECT command. If the File Is A DLL File (Usually With Extension .ocx), The IT I ' file, then the .INF file describes a list of other files that make up the codebase, and where these can be found. If the codebase is simply a DLL / OCX file, the installation only requires loading the DLL and then calling the DllRegisterServer function in the DLL. If this function succeeds, IE can then try to create the control. There are two common points of failure in this scenario, both of which fail silently. The first is if the DLL can not be loaded on the client machine Using loadlibrary. this usually happensiff the DLL is dependent on other files, such as library DLLs, Delphi packages, or even specific system DLLs that are not available on the client machine. Load failure can also occur if the DLL file was corrupted. If the DLL fails to load properly , no code in the DLL will execute, which means the DLL can not be debugged in the debugger. Failure can also occur if the DLL can be loaded but it fails to initialize. This usually is not a configuration problem, but probably happens because one Of Your Units 'Initialization. You Can Determine if your dll gets loaded Correctly by Setting A Breakpoint At One of your Units' Initialization Section.
If the DLL gets loaded, the initialization sections will be executed, and you can step through their execution until you find the failure. Another failure can occur if your control can not register itself correctly. This can happen if your control does not export DllRegisterServer, or if this function fails. Since most Delphi ActiveX controls start with code generated by the Wizard, the first of these is unlikely. There are number of reasons why registering the DLL server might fail, but a common one on NT is caused by inadequate user rights. Each object is registered by its factory (the object you created in the initialization section of your control's implementation unit), so if any of the factories fail to register the entire server will fail to register. If you use custom factory classes, you Might Want To Check That Sses Don't Fail on The User's Machine.creating The Control
Once your control is correctly installed and registered, IE tries to create an instance of the control. If you'e tested your control locally on your development machine, it's unlikely that this step will fail, but there are a few errors that will make you just say DOH! The first is that the ClassID in your HTML file may be incorrect. Up until this point, the ClassID specified in the HTML has played no part in the code download process, so an incorrect ClassID would only show a failure in this phase. Various low-memory or low-resource conditions might cause your control to fail to create itself as well. The object creation will fail if your COM object fails to construct itself. If you're building an ActiveX control, your control's Create or Initialize Method Might Throw An Exception Or OtherWise Indicate Fail (this is a condition you can debug) .putting the control in the html page
After the control is created, there are still conditions that might fail the installation of your control into the browser's HTML page. If your tag contains PARAM statements for your object, the control must be marked safe for initializing in order for IE to allow it to appear on the page, if your security setting is Medium or High. If the HTML tag declares your object available for scripting on the page, IE checks that the control is safe for scripting. In either case, if the control is appropriately marked, and security is Medium or High, the control will not appear. Note that the Delphi ActiveX Class Hierarchy does not support the PARAM tag by default-this is a feature you must implement on your control yourself. nevertheless, it's not uncommon for a beginner who does not know this to supply a PARAM tag on the HTML page. Because the control is also not marked safe for initializing by default, supplying the PARAM tag will suppress your object's installation on the HTML page even if the object does not have the means to receive these PARAMs through IPersistPropertyBag. If you have a script that refers to your control, and the control was not marked safe for scripting, the script will probably give you a runtime error when it tries To Access The (now nonexistent) Control on the page.conclusion
The trick to diagnosing the failure of any complex process is to recognize the signs of success or failure of each step in the process. While IE intentionally suppresses most of these clues, it leaves you with just enough information to be able to diagnose what it's doing The attached flowchart summarizes the code Download Process, and can help you to diagnose a failure in your download.
Code Download Flowchart