Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7013139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:20:52+00:00 2026-05-27T22:20:52+00:00

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

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:20:53+00:00Added an answer on May 27, 2026 at 10:20 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since I got TLDR (too long didn't read) comments, I stripped 90% of this
TLDR: Started with this question simplified it after got some of it working and
TLDR ; I need simple a Python call given a package name (e.g., 'make')
Suppose I have this class: type Pet (name:string) as this = let mutable age
Update: This may be something that just isn't doable. See this TLDR: How do
I have this code: filename = tkFileDialog.askopenfilename(initialdir=lists/custom/, filetypes=((Word list, *.tldr), (All files, *.*))) If
TLDR; this is not a well-phrased question, so you should probably not bother with
TLDR: What are the pros/cons of using an in-memory database vs locks and concurrent
TLDR; How do I read data from a table using Entity Framework, when the
tldr: Is ~90,000 super columns with 1 to 10 columns each too many in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.