Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Page OCX

Status
Not open for further replies.

BobLaw

Programmer
Oct 2, 2000
27
US
Hi,

Can someone explain what I need to do to have an OCX to display on a Web page? I made a small OCX tool, it works on the development machine fine. But, when I put it on the server and call up the page with the Object call from the cab file, it asks if I want to install, I click yes, it loads but then I just get that small square in the upper right corner of the page, no control loads.
What can I be doing wrong?
Thank you.
 
Hello,

You need to sign the .CAB file which was created. There is an SDK download file inetsdk.exe available on the Microsoft Download section. In there you will find signcode.exe that is used to sign .CAB, .EXE and so on.

Also you will need a certificate with a private key file. For this purpose you can install a certificate server using NT Option Pack. For this purpose, you also need IIS installed on the same machine. Alternatively you can purchase a certificate from the internet but I am assuming that you do not want to go to verisign for that purpose. Once you have a certificate server, you can request a certificate from it and store it as a file .spc and .pvk for the certificate and private key files respectively.

Finally, once you have all that use the signcode to sign your .CAB with the .spc and .pvk. And the rest remains the same, i.e. your OBJECT tag on the ASP or HTML page does not change unless your CLSID has changed due to a different version.

Good luck.
 
I'm having just about the same problem, except some people can access it, and some cannot. It works fine for me and a couple others, but other people get the blank little activeX box.

We have all set the site as a trusted site in our security settings in IE, but I have not done anything with the signing of the .cab file.

I didn't think that was neccesary if you make it a trusted site. Any help would be appreciated. Thanks.
 
Without certificate just drop all your IE security settings and you should have no problem. Give a man a program and tomorrow he will be hungry.
Teach a man to program and he will never hunger again.
--Sunr¿se

 
I did that. On each computer I listed that site as a "trusted site" Again it works for some and not for others. It doesn't coincide with browser version or OS. Some people with 2k and IE 6 could run it, others couldn't. Some with NT and 5.5 could, some couldn't.
 
Signing your code doesn't pass the client a license. You may be using redistributable objects in your project that the user's machines don't all have a license for.

This is done by creating an LPK file, storing it on your web server, and referencing it in your <object> tag.

Search for LPKTOOL.
 
Yeah I did the licensing as well.

I solved the problem though. It was a win32 api call that killed it. Apparently the call I was using was win2k/xp specific. So that explains it not working on past OS'es, now as for the 2k machines it didn't work on, apparently the data bound controls added in one of the later component modules also broke the activex. I replaced all those controls, and got rid of those API calls and it works on every machine I've tested on though.

Thanks for the help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top