How to implement IObjectSafety programmatically in JScript.NET?

After an extensive research I figured out, as there is absolutely no documentation for IObjectSafety in JScript. NET, I can't implement this interface directly in the code.

Up vote 3 down vote favorite share g+ share fb share tw.

Tldr; How to mark a JScript. NET dll as safe for scripting? Consider this JScript.

NET library (helloworld1. Js): package helloworld1{ class test1 { public function test1run(){ return 'This is a string returned from helloworld1. Dll'; } } } After running it through jsc.

Exe /nologo /t:library helloworld1. Js and regasm /nologo /codebase helloworld1. Dll I can use it on my local html page with: var helloworld1 = new ActiveXObject("helloworld1.

Test1"); alert(helloworld1. Test1run()); It all works fine and I get an alert with This is a string returned from helloworld1.dll. Now... I want to get rid of the dreaded IE security warning which pops up every time the ActiveX object is instantiated: An ActiveX control on this page might be unsafe to interact with other parts of the page.

Do you want to allow this interaction? I know the way to remove the security warning is to mark the dll as safe for scripting and implement IObjectSafety. I know how to do this in VB6 and VB.

NET but how do I go implementing it in JScript. NET? Any help is really appreciated.

.net jscript jscript.net link|improve this question edited Dec 29 '11 at 13:42 asked Dec 23 '11 at 22:37Tony16811 100% accept rate.

Possible Duplicate of stackoverflow.com/questions/4549465/… – Erik Philips Dec 23 '11 at 22:51 @Erik Philips: I don't think so. As far as I can see, that question is about signing a dll with a real certificate, my question involves implementing IObjectSafety in JScript.NET. – Tony Dec 23 '11 at 23:00 You stated I want to get rid of the dreaded IE security warning which pops up every time the ActiveX object is instantiated, which requires signing your DLL, which also requires implementing IObjectSafety.

– Erik Philips Dec 23 '11 at 23:02 @Erik Philips: I added programmatically to the question title. I hope that satisfies you. – Tony Dec 23 '11 at 23:08.

After an extensive research I figured out, as there is absolutely no documentation for IObjectSafety in JScript. NET, I can't implement this interface directly in the code. I finally settled down with adding the needed registry keys for marking my dll as "Safe for initialization" and "Safe for scripting": HKEY_CLASSES_ROOT\CLSID\MY_COM_CLASS_GUID\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4} HKEY_CLASSES_ROOT\CLSID\MY_COM_CLASS_GUID\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4} I add these keys during my setup routine, when helloworld1.

Dll is deployed on target machines. It works flawlessly.

Sigh. – x0n Dec 29 '11 at 4:03 @x0n: No it's NOT safe. As matter of fact, this is pretty dangerous.

Don't try it. – Tony Dec 29 '11 at 9:07.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions