|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem distributing ActiveX control
I have an ActiveX control (.ocx) that have packaged using P&D wizard into a .CAB file. This is called in an ASP page using CLASSID and CODEBASE tags. This runs successfully on the machine that I used to develop this control. However, when another I launch my Web app from another PC, it starts downloading the .CAB file, and at the end it terminates with "Object doesn't support this method or property" error. Subsequently, when I check the registry on that machine, it does not show any entries for the new ocx. What could be the problem? Could it be that some of the dependent files are missing? Also, I have both Visual Studio 6 and Visual Studio .Net installed on my development PC.
Appreciate any inputs. Thanks in advance. |
|
#2
|
|||
|
|||
|
Do you have any script on the ASP page that is calling any of your OCX's methods? If so...you may be making the call incorrectly.
Are you calling/using any other objects in your OCX's UserControl_Initialize sub? |
|
#3
|
|||
|
|||
|
I am calling a Public Sub called Initialize_Control (this was created by me in the General section) in the ASP's VBscript as follows:
MyControl.Initialize_Control. I know that this is existing and being called correctly. I do not have anything in UserControl_Initialize sub. Somebody suggested that I register this .ocx manually by copying the file over to the client machine I am trying to test this on...You user regsvr32 for that, right? Do you think that will work? Thx. |
|
#4
|
|||
|
|||
|
If you can install the OCX on the clients machine manually (using regsvr32) that's one option. The only problem with that is if you make a new version of the OCX, you'll have to break compatability and install manually again or you'll have to manually uninstall the old and install the new. So if you see future versions down the line...I'd highly suggest taking the time to get the .CAB deployment working.
Before you go this route...let me just suggest that you double check your <OBJECT> tag. Specifically your CLASSID. Since you say the component downloads, the codebase must be correct...so not being able to use the object after the download could possibly be caused by a bad CLASSID. The only other thing I can possibly think of is if your Initialize_Control sub is trying to create/use an object that either a) you didn't include in your package or b) you have one version of the object on your machine, and your client has a different (likely older) version on their machine. |
|
#5
|
|||
|
|||
|
Having different versions of included files is quite possible since I also have VS.NET installed on my development machine. One thing I was thinking was not to include any of the supporting DLLs/OCXs since they are already available on the client machine (this is so since there are other controls that share almost same files). This way I could avoid any version conflicts. But you are right, I need to get the .CAB thing working. Manual registration is not a practical solution.
Lemme ask you this...doesn't IE not download and register existing files if there are already present on the client? For instance if my control called say Mytest.ocx requires 1.DLL, 2.DLL, and 3.ocx. Imagine 1.DLL, 2.DLL, and 3.ocx are all already present on client machine. I make changes to Mytest.ocx, and package all four files into a new .CAB file. Now lets say my 1.DLL (say one of Microsoft DLLs) is of different version than what the client already has. Shouldn't IE ignore 1.DLL, 2.DLL and 3.ocx while downloading the .CAB file? Wouldn't manually registering just Mytest.ocx and having it working essentially mean that those files are really redundant. Your insights. |
|
#6
|
|||
|
|||
|
IE doesn't even know what files are included in your .CAB. IE bases it's decision to download the .CAB entirely on the version # of the .CAB itself (as opposed to the versions of the files within the .CAB). Once it is downloaded it automatically installs all new .dll and .ocx files. If a file already exists on your clients computer, it checks what version they have. If they have an older version, the file from your .CAB IS installed. If your .CAB contains an older version, your file is ignored.
If you are sure that the client computer already has the other files that your ocx needs, then I would definitely exclude those files from the .CAB. I do this mostly to reduce the download times for my clients. I would say 90 - 95% of my .CABs contain just my .ocx. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Problem distributing ActiveX control |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|