Solved

Activex unsafe warning - COM C# component

Posted on 2002-04-15
12
932 Views
Last Modified: 2013-11-25
I have a simple C# object(class) that I reference in a <OBJECT clsid="...> tag of an HTML page. I've putted this object into the GAC with gacutil and registered it as COM object with the regasm utility program. The <object> references the clsid in the registry.

Is there an easy way of bypassing the Activex warning in Internet Explorer whithout modifying the security level in the browser?

In an old COM-ATL object, I was using the IObjectSafetyImpl<CMyCtrl, INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA> derivation to avoid this type of message. Is there a way of doing the same thing in C#?

My component will be used in an intranet solution only whithout needs to be visible in the client application.

Is that the better way I use to make a component in Dot Net for referencing in the browser? What are the other solutions?
0
Comment
Question by:mhebert
  • 4
  • 2
  • 2
  • +3
12 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6944019
Sure there is a way. I just forgot how it was implemented :-(
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7508184

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:
 - To be deleted and points refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7508405
mhebert, is this still an issue?

nico5038,
I can help this person if he still needs this. Can we keep this one open unless mhebert does not reply?
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 54

Expert Comment

by:nico5038
ID: 7508418
No problem with me, a mod will ignore my proposal because of your comment!

Nic;o)
0
 
LVL 1

Author Comment

by:mhebert
ID: 7520803
It's still an issue... ;-)
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7522176
mhebert,
Where is the object registered? At the server or at the client? At the server you should use the http protocol:

classid="http:MyControl.dll#FULLY.QUALIFIED.NAME"

Place the file and the .dll in a virtual directory. Or place the .dll in the gac like you did. The virtual directory should only have script permissions. No other setting!!!

CJ
0
 
LVL 1

Author Comment

by:mhebert
ID: 7525151
The object is registered on the client. It acts like an activex.
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 7525213
I was hoping it was not the case. For client side .Net components you can do two things.

1) Change the client ActiveX settings
2) Sign the ActiveX control or object.

Signing ActiveX can be done by a company like VeriSign. They can mark your component to be safe for initialization and scripting. But even then, if the client does not allow components marked safe for initialization or scripting it just won't run.

CJ
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7653311
Listening

Computer101
E-E Admin
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 7998638
So folks, what to do?

No comment has been added lately.
To cleanup this TA, I will recommend to moderators that this question is:

*** Answered by: CJ_S ***

Please leave any comments here within the next seven days, or finalize the question if you own it
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
peterchen
EE Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8030117
A request for deletion has been made.  If no response or you feel this is in error, comment.  If no objection, I will delete in three days.

Computer101
E-E Admin
0
 

Expert Comment

by:Chmod
ID: 8376685
No response from mhebert to CJ_Ss comment on 12/03/2002 05:44AM PST or to Computer101 in http://www.experts-exchange.com/Community_Support/Q_20531246.html. Hence closed as recommended by peterchen

Chmod
Community Support Moderator @Experts Exchange

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google Analytics 5 45
Customizing meta title for 404 page template in WordPress' TwentySixteen theme 2 92
Message not shown 5 67
Website Monitoring Tools 3 22
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

808 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