Marking Business Objects as Safe for Scripting

To help ensure a secure Internet environment, you need to mark any business objects instantiated with the RDS.DataSpace object's CreateObject method as "safe for scripting." You need to ensure they are marked as such in the License area of the system registry before they can be used in DCOM.

To manually mark your business object as safe for scripting, create a text file with a .reg extension that contains the following text. The following two numbers enable the safe-for-scripting feature:

[HKEY_CLASSES_ROOT\CLSID\<MyActiveXGUID>\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}]

[HKEY_CLASSES_ROOT\CLSID\<MyActiveXGUID>\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]

where <MyActiveXGUID> is the hexadecimal GUID number of your business object. Save it and merge it into your registry by using the Registry Editor or double-clicking directly the .reg file in the Windows Explorer.

Business objects created in Visual Basic« 5.0 can be automatically marked as "safe for scripting" with the Application Setup Wizard.

To mark business objects safe for scripting in Visual Basic 5.0

  1. Start the Visual Basic 5.0 Application Setup Wizard.

  2. On step one, choose your project, and then click Create Internet Download Setup.

  3. On step four, click Safety and select Safe for initialization and Safe for scripting.

  4. On the last step, the Application Setup Wizard creates an .htm and a .cab file. You can then copy these two files to the target computer and double-click the .htm file to load the page and correctly register the server.

  5. Because the business object will be installed in the Windows\System32\Occache directory by default, you should move it to the Windows\System32 directory and change HKEY_CLASSES_ROOT\CLSID\<MyActiveXGUID>\InprocServer32 registry key to match the correct path.

  6. If you find that your business object isn't working at this point, check the .inf file that is included in the \Support directory under the Application Setup Wizard installation directory. It should contain "RegisterServer=yes" and the [AddSafeToScript] section.