FatJoey
asked on
ActiveX CAB does not work on a machine where the ocx was not previously intsalled
Here is some background. I created a fairly indepth OCX, which takes advantage of mulitple controls and classes.
In my development environment the control works well, on a web page and in a vb form.
However, when the created cab is put onto a webserver, the control fails to activate when the page is accessed.
Using visual studio installer, if I create an MSI and install the ocx and it's components onto another machine and then access this same page. The control works fine.
This leads me to believe that the cab was perhaps missing some required files, but it in fact has everything +more then the installer had.
Does anyone know how I can determine whats missing in my cab, or why my ocx will not run on a foreign computer when accessed via a webpage?
In my development environment the control works well, on a web page and in a vb form.
However, when the created cab is put onto a webserver, the control fails to activate when the page is accessed.
Using visual studio installer, if I create an MSI and install the ocx and it's components onto another machine and then access this same page. The control works fine.
This leads me to believe that the cab was perhaps missing some required files, but it in fact has everything +more then the installer had.
Does anyone know how I can determine whats missing in my cab, or why my ocx will not run on a foreign computer when accessed via a webpage?
I have recently been working on web pages with .cab files. Although i didn't write the ActiveX control myself there were plenty of problems to overcome.
As suggested by PaschalNee, i ran into permissions issues, and needed local admin rights to install on demand the .cab file.
Is your .cab signed? If not you need to check your browser accepts unsigned ActiveX controls.
Also do you have licensing on the ActiveX control. If so you need to create an .lpk file. You would also need the following code in the top of your .htm/.asp page.
<OBJECT id="Microsoft_Licensed_Cla ss_Manager _1_0" classid="clsid:5220CB21-C8 8D-11cf-B3 47-00AA00A 28331" VIEWASTEXT>
<PARAM name="LPKPath" value="YOUR.lpk">
</OBJECT>
You can find more info on lpk tool on the Microsoft MSDN site.
Also check you have the correct codebase and options...
<OBJECT id="GridEXSpendTable" codebase="YOUR.CAB#version =2,0,0,230 8"......</ OBJECT>
There are many options for the "codebase" property.
What options do you have in your .inf file mine ended up as this...
-------------------------- ---------- ---------- -
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[RIinstallSystemFiles]
CopyFiles=CopyThese
RegisterOCXs=RegisterFiles
AddReg=AddToRegistry
[DestinationDirs]
DefaultDestDir=11
[SourceDisksNames]
1=%DiskName%,YOUR.CAB,1
[Add.Code]
YOUR.ocx=YOUR.ocx
[CopyThese]
YOUR.ocx
[SourceDisksFiles]
YOUR.ocx=1
[RegDll]
11,,YOUR.ocx,1
[IDGantt.ocx]
file-win32-x86=thiscab
clsid={YOURCLSID}
FileVersion=1,3,0,0
RegisterServer=yes
[RegisterFiles]
%11%\YOUR.ocx
-------------------------- ---------- ---------- -
I think most of my problems were caused by the .inf file not copying and registering on the client machine.
Hope some of this may help
AArnie.
As suggested by PaschalNee, i ran into permissions issues, and needed local admin rights to install on demand the .cab file.
Is your .cab signed? If not you need to check your browser accepts unsigned ActiveX controls.
Also do you have licensing on the ActiveX control. If so you need to create an .lpk file. You would also need the following code in the top of your .htm/.asp page.
<OBJECT id="Microsoft_Licensed_Cla
<PARAM name="LPKPath" value="YOUR.lpk">
</OBJECT>
You can find more info on lpk tool on the Microsoft MSDN site.
Also check you have the correct codebase and options...
<OBJECT id="GridEXSpendTable" codebase="YOUR.CAB#version
There are many options for the "codebase" property.
What options do you have in your .inf file mine ended up as this...
--------------------------
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[RIinstallSystemFiles]
CopyFiles=CopyThese
RegisterOCXs=RegisterFiles
AddReg=AddToRegistry
[DestinationDirs]
DefaultDestDir=11
[SourceDisksNames]
1=%DiskName%,YOUR.CAB,1
[Add.Code]
YOUR.ocx=YOUR.ocx
[CopyThese]
YOUR.ocx
[SourceDisksFiles]
YOUR.ocx=1
[RegDll]
11,,YOUR.ocx,1
[IDGantt.ocx]
file-win32-x86=thiscab
clsid={YOURCLSID}
FileVersion=1,3,0,0
RegisterServer=yes
[RegisterFiles]
%11%\YOUR.ocx
--------------------------
I think most of my problems were caused by the .inf file not copying and registering on the client machine.
Hope some of this may help
AArnie.
ASKER
I will take a look at IIS permission but I don't think this is the issue.
I'm pretty sure it has something a component not downloading and installing via IIS. What lead s me to this conclusion is the following:
1) If I use an MSI created with Visual Studio Installer, install it on the a computer and then access the same web page, the borwser shows the correct components.
2) As a test, I took the htm file generated by the packaging and deployment wizard and viewed each custom component in my OCX. The OCX contains 5 controls, which are then aggreegated into another control. 4 of the 5 controls are visible in IE using the cab file on fresh machine. This leads me to belive the the "final" control is not visible because of the problematic 5th control.
I'm not neccessarily looking for a solution. The info I seek is how do I go about debugging this situation? How can I tell what components are failing to DL and install in this 5th control. And possibly, why?
Thanks for your help guys.
I'm pretty sure it has something a component not downloading and installing via IIS. What lead s me to this conclusion is the following:
1) If I use an MSI created with Visual Studio Installer, install it on the a computer and then access the same web page, the borwser shows the correct components.
2) As a test, I took the htm file generated by the packaging and deployment wizard and viewed each custom component in my OCX. The OCX contains 5 controls, which are then aggreegated into another control. 4 of the 5 controls are visible in IE using the cab file on fresh machine. This leads me to belive the the "final" control is not visible because of the problematic 5th control.
I'm not neccessarily looking for a solution. The info I seek is how do I go about debugging this situation? How can I tell what components are failing to DL and install in this 5th control. And possibly, why?
Thanks for your help guys.
I don't really know about debugging the rest of this but debugging the possible permissions problems can be done enabling the auditing on your file system and check what messages get logged to the event manager. It should log failed read/execute attempts on the components. I'm assuming you are using NTFS and not FAT as a file system.
ASKER
Sorry paschalNee, I'm a little lost can you explain that?
I need to enable auditing on web server file system or the client file system? Either way how do I go about doing that?
I need to enable auditing on web server file system or the client file system? Either way how do I go about doing that?
On the server locate the DLL's you are using, right click on each one and go to the security tab. If you do not have a security tab then the file system id not NTFS and this is not going to work. Click the auditing button. Enable auditing of success or failure for the user your web server executes as (or everybody if you are not sure).
After restarting your app you will be able to see the detail of what is happening in the security section of the event viewer (under administrative tools from the Start menu).
After restarting your app you will be able to see the detail of what is happening in the security section of the event viewer (under administrative tools from the Start menu).
ASKER
This wasn't the issue. I solved it just now.
I put logging statements in the problematic ocx and found that it couldn't init one of its comp ocx's because there was a conflicting ocx (older version with no binary compat set) on the system.
Thanks though.
JOe
I put logging statements in the problematic ocx and found that it couldn't init one of its comp ocx's because there was a conflicting ocx (older version with no binary compat set) on the system.
Thanks though.
JOe
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>
If the user does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp
Cd&
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>
If the user does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp
Cd&
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ Refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
alexgreen
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you check that the user account under which your web server is running has the required permissions to access all the components required? As a test you can try set the web server to run scripts using an account that has access to everything (don't leave it that way though!). This should determine if this is a permissions problem.