为解决ActiveForm在客户端使用IE不能下载问题,在网上搜到一篇好文,建议在这方面有问题的弟兄看一看,或许会有帮助,文章对IE下载ActiveX控件的步骤和过程做了较为详细的叙述,对于已能成功下载的人来讲,也有一定帮助.
因时间较紧,没来得及翻译,敬请原谅
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 shouldn’t pop up error messages that the user isn’t capable of dealing with anyway, and most end-users can’t 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 Download Process
In order to create your control in the web browser, Internet Explorer must hav received an HTML file containing an
1<object> tag. This tag contains parameters that dictate the first steps in the download process.
2
3For example:
4
5
6 <object "any="" "do="" "this="" "unsigned="" #version="" (authenticode)="" (in="" (many="" (presumably="" (remember,="" (the="" (this="" (usually="" ,="" .cab="" .inf="" .ocx),="" 0%,="" 1.="" 1.0.1.0),="" 2.="" 2.0="" 2.0.="" 3.="" <="" <object="" a="" able="" about="" accept="" across="" activex="" address="" after="" align="center" all="" all,="" allows="" already="" also="" an="" and="" announces="" another="" any="" appear="" appear,="" appears="" are="" are:="" aren’t="" as="" at="" at,="" attempting="" authenticode="" available="" bar)="" base="" basic="" be="" because="" been="" before="" both="" box.="" breakpoint="" browser.="" browser’s="" building="" but="" by="" cab="" caches="" called="" calling="" can="" cannot="" can’t="" case="" case-sensitive),="" cases="" cause="" caused="" certificate="" certificate.="" check="" checking="" checks="" choose="" classes="" classes,="" classid="" classid.="" client="" code="" code-signed,="" codebase="" codebase,="" codebase.="" codebase’s="" com="" command.="" common="" completes="" component="" condition="" conditions="" configuration="" connection="" construct="" contained="" contains="" continue?"="" control="" control"="" control,="" control.="" controls="" controls,="" control’s="" copied="" copy="" copying="" correctly="" correctly.="" corrupted.="" create="" created="" created,="" created.="" creating="" creation="" current="" currently="" custom="" debug).="" debugged="" debugger.="" debugging="" decided="" default),="" delphi="" depend="" dependent="" depends="" deploy="" describes="" determine="" determined="" development="" dialog="" dialog.="" didn’t="" difficult="" digitally="" directory="" directory,="" directory.="" disk="" display="" dll="" dll.="" dllregisterserver="" dllregisterserver,="" dlls="" dlls,="" do="" do."="" does="" doesn’t="" doh!="" done="" don’t="" download="" download-progress="" downloaded="" downloaded.="" downloading="" each="" entire="" error,="" errors="" etc.="" even="" exactly="" exception="" exception.="" execute,="" executed,="" execution="" exiting="" explorer="" export="" extension="" eye="" factories="" factory="" fail="" fail,="" failed="" fails="" fails.="" failure="" failure.="" failure?="" feedback,="" few="" file="" file,="" file.="" files="" files,="" find="" first="" for="" forgotten="" found="" found,="" found.="" from="" ftp,="" function="" generated="" gets="" give="" gives="" got="" happen="" happenes,="" happening,="" happens="" has="" hasn’t="" have="" have.="" height="250" high="" high,="" how="" hspace="0" html="" html,="" http="" http(the="" ie="" ie’s="" if="" implementation="" in="" inadequate="" incorrect="" incorrect.="" incorrectly="" incorrectly.="" indicate="" indicates="" information="" initialization="" initialize="" initialize.="" install="" installation="" installation.="" installed="" installed,="" installing="" instance="" internet="" into="" involves="" is="" is,="" isn’t="" it="" it,="" it.="" it?="" it?"—if="" its="" itself="" itself.="" it’s="" just="" kind="" kinds="" know="" knows="" last="" later="" left="" library="" lies="" list="" load="" loaded="" loaded,="" loading="" loadlibrary.="" local="" locally="" lock="" locked,="" locked.="" looked="" low="" low,="" low-memory="" low-resource="" machine="" machine,="" machine.="" machine’s="" make="" many="" matches="" may="" means="" mechanism="" medium="" medium,="" meter="" method="" microsoft="" might="" missing,="" modem.="" most="" moves="" moving="" multiple="" must="" mycontrol.htm="" name="" navigator="" ncompass="" need="" netscape="" newer="" no="" not="" nt="" nuber="" number="" object="" occache="" occur="" ocx="" of="" often="" on="" once="" one="" only="" onto="" open="" optional—if="" or="" other="" otherwise="" out="" overwrite="" packages,="" page="" page.="" pages="" part="" path="" phase.="" piece="" played="" plugin.="" point,="" points="" probably="" problem="" problem,="" problem.="" problems="" proceed="" process="" process,="" progress="" properly,="" publisher"="" publisher.="" putting="" quick="" rather="" reads="" reasons="" refuse="" register="" register.="" registered="" registered,="" registering="" releases="" remember="" remote="" requested="" requires="" respond="" results.="" retrieve="" right,="" right.="" rights.="" running,="" same="" save="" say="" says="" scenario,="" second="" section="" section.="" sections="" security="" see="" sensitive)="" server="" server,="" servers="" set="" setting="" setting,="" settings="" should="" show="" shown.="" signature="" signed="" silently.="" simply="" simulate="" since="" site.="" situations="" slow="" so="" sometimes="" space,="" specific="" specified="" specifies.="" specify="" spelled="" stage.="" stamped="" start="" status="" stays="" step="" step,="" steps="" steps:="" still="" subdirectory="" succeeded="" succeeds,="" success="" success?="" successfully,="" successfully—either="" such="" summarily="" summary="" sure="" system="" tag="" telling="" telltale="" tested="" testing="" than="" that="" the="" their="" then="" there="" these="" thing="" third="" this="" three="" through="" throw="" throws="" to="" tries="" try="" two="" type="" typed="" typing="" unit),="" units’="" unlikely="" unlikely.="" unsigned="" until="" up="" upgrade="" upgraded="" uri="" uris.="" use="" useful="" user="" user’s="" using="" usually="" validates="" various="" vendor="" vendor,="" verification="" verify="" version="" version.="" visual="" vspace="0" want="" warning="" was="" way="" ways—if="" web="" well.="" what’s="" when="" where="" whether="" which="" while="" why="" width="350" will="" windows="" wish="" with="" wizard,="" won’t="" working="" would="" yet="" yield="" yields="" you="" your="" you’e="" you’ll="" you’re="" you’ve=""> 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 won’t appear.
7
8Note that the Delphi ActiveX Class Hierarchy doesn’t 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 doesn’t 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 doesn’t have the means to receive these PARAMs through IPersistPropertyBag.
9
10If you have a script that refers to your control, and the control wasn’t 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.
11
12Conclusion
13
14The 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.
15
16The attached flowchart summarizes the code download process, and can help you to diagnose a failure in your download.
17
18Code Download Flowchart
19
20Use this flow chart for diagnosing download errors.</object></object>