?
Solved

ActiveX CAB does not work on a machine where the ocx was not previously intsalled

Posted on 2003-02-21
10
Medium Priority
?
742 Views
Last Modified: 2007-12-19
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?
0
Comment
Question by:FatJoey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 

Expert Comment

by:PaschalNee
ID: 7995319
Can say for sure but previously when I have run into similar problems it was related to permissions.  No doubt you have an admin account on the machine you develop on or at least you are the owner of all the files you need to use.

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.

0
 

Expert Comment

by:AArnie
ID: 7995544
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_Class_Manager_1_0" classid="clsid:5220CB21-C88D-11cf-B347-00AA00A28331" 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,2308"......</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.
0
 

Author Comment

by:FatJoey
ID: 8012174
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.
0
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 

Expert Comment

by:PaschalNee
ID: 8015280
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.
0
 

Author Comment

by:FatJoey
ID: 8017787
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?
0
 

Expert Comment

by:PaschalNee
ID: 8024014
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).
0
 

Author Comment

by:FatJoey
ID: 8028138
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

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9350155
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:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 3

Expert Comment

by:alexgreen
ID: 9679423


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
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9724136
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question