别人是通过打开我的共享的方式,打开我的带控件的页面的,为什么我的控件看不到阿?

解决方案 »

  1.   

    因为别人的机子没有注册你的控件呀!你要把你的控件打包成一个cab文件放在页面上当别人打开的时候进行自注册!
      

  2.   

    你的WEB页中应该少了一行东东:
    <OBJECT classid="clsid:C56AFCF6-607E-464E-AD93-611EE689E7F2"
            codebase="myactivex.ocx">
            ....
    </OBJECT>估计,你没写"codebase=",它要指向web能访问到的你的控件的路径。
    一般是个url"http://..."因为你自己机器编译控件时,就注册了,所以没codebase也能正常运行。
    你可regsvr32 -u 你的控件,然后再试试,这时本机也不行。
      

  3.   

    创建PVK文件[私人密匙文件]makecert -sk DigitalTitan DigitalTitan.pvk
    makecert -n CN=TelStar TelStar创建CER文件[公司证书]makecert -sk DigitalTitan.pvk TelStar.cer创建SPC测试软件出版商证明书cert2spc root.cer TelStar.cer TelStar.spc创建INF文件[version]
    signature="$CHINA$"
    AdvancedINF=2.0[Add.Code]
    WebOffice.ocx=WebOffice.ocx
    mfc70.dll=mfc70.dll
    msvcrt.dll=msvcrt.dll
    olepro32.dll=olepro32.dll[mfc70.dll]
    file-win32-x86=thiscab
    FileVersion=7,0,9466,0
    DestDir=11
    RegisterServer=yes[msvcrt.dll]
    file-win32-x86=thiscab
    FileVersion=6,1,9844,0
    DestDir=11
    RegisterServer=yes[olepro32.dll]
    file-win32-x86=thiscab
    FileVersion=5,0,4522,0
    DestDir=11
    RegisterServer=yes[WebOffice.ocx]
    file-win32-x86=http://10.70.151.253:9003/ActiveX/WebOffice.cab
    clsid={05430EC0-69CA-437A-B1F9-4B78B8647BEA} 
    FileVersion=1,0,0,1
    RegisterServer=yes
    ;创建CAB文件
    cabarc -s 6144 n WebOffice.cab mfc70.dll msvcrt.dll olepro32.dll ASYCFILT.DLL STDOLE2.TLB WebOffice.ocx WebOffice.inf使用Code Signing Wizard签署一个CAB文件
    SIGNCODE.exe
    另:
    makeCert -sk DigitalTitanKey -n "CN=TelStar" -ss TelStar TelStar.cer
    makecert -is TelStar -ic TelStar.cer -ss TelStarCompany.cerCert2SPC MyCert.cer MyCert.spc
      

  4.   

    打包工具包:
    申请证书:Win2000:控制面板-管理工具-证书颁发机构[没有则更新组件]Http://127.0.0.1/CertSrv/
    签名工具包:http://download.microsoft.com/download/b/e/f/bef2551b-401d-4311-ab8f-13d3892b8154/codesigningx86.exe
      

  5.   

    Web页例子:
    <object id=DWebOffice style="left: 0px; width: 100%; top: 0px; height: 450px" classid="clsid:05430EC0-69CA-437A-B1F9-4B78B8647BEA" viewastext codebase="http://DigitalTitan:9003/ActiveX/WebOffice.cab#version=1,0,0,2">