Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

ActiveX Self register

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eusebiu - 23 Aug 2007 19:00 GMT
Hello... I am developing a MFC ActiveX that I want to self register
when IE promts to Install it.

I have added the VALUE "OLESelfRegister", "\0"  to activex's
resource
file (.rc) and I have STDAPI DllRegisterServer(void) method in my
code.

When I build my ActiveX project, the ActiveX is registered fine and
it
work on my machine. If I added to a .cab file(cabarc -s 6144 N
myactivex.cab myactivex.ocx myactivex.inf myactivex) and then sign
it(signtool sign /a myactivex.cab) and I try to display the page from
OTHER machine in my local network, I get a dialog that is asking me
if
I want to install it or not.I click install but the ActiveX is not
displayed.

The object tag is :

object id="MyActiveX1" width="655" height="347" codebase='../../
Applets/myactivex.cab'
                               classid="CLSID:069B70F6-47F4-4b0a-
B08D-73A9F2F2EB36">
                               <param name="_Version" value="65536">
                               <param name="_ExtentX" value="2646">
                               <param name="_ExtentY" value="1323">
                               <param name="_StockProps" value="0">
                               <span style="color: Red; font:
18">ActiveX control failed to load! (Use Internet Explorer
                                   only!)
                                   <br />
                                   Please check browser security
settings.</span>
                           </object> and the inf file is :

[Add.Code]
myactivex.ocx=myactivex.ocx
myactivex.inf=myactivex.inf

[myactivex.ocx]
file-win32-x86=thiscab
clsid={069B70F6-47F4-4b0a-B08D-73A9F2F2EB36}
RegisterServer=yes
FileVersion=1,0,0,1

[myactivex.inf]
file-win32-x86=thiscab

I am forgeting something?

Thanks!
George Ter-Saakov - 23 Aug 2007 19:28 GMT
As I recall from about 7 years ago your ActiveX needs to  be marked as
SafeForScripting and SafeForInitialization (simply 2 keys in the registry)
Try this article
http://support.microsoft.com/kb/161873/EN-US/

George.

> Hello... I am developing a MFC ActiveX that I want to self register
> when IE promts to Install it.
[quoted text clipped - 48 lines]
>
> Thanks!
eusebiu - 23 Aug 2007 21:28 GMT
> As I recall from about 7 years ago your ActiveX needs to  be marked as
> SafeForScripting and SafeForInitialization (simply 2 keys in the registry)
[quoted text clipped - 56 lines]
>
> - Show quoted text -

Thanks for your answer...
I;ve marked the ActiveX SafeForInitialization and
SafeForInitialization but it isn't work... :(
Alvin Bruney [MVP] - 26 Aug 2007 02:22 GMT
For security reasons, inspite of the object safety interfaces, you will
always get a security prompt. I know of no way to override that. ActiveX
controls can't simply install themselves on the end-user system without
their knowledge.

Signature

Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET - MS Press
Professional VSTO 2005 - Wrox/Wiley
OWC Black Book www.lulu.com/owc

>> As I recall from about 7 years ago your ActiveX needs to  be marked as
>> SafeForScripting and SafeForInitialization (simply 2 keys in the
[quoted text clipped - 61 lines]
> I;ve marked the ActiveX SafeForInitialization and
> SafeForInitialization but it isn't work... :(

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.