.NET Scripting with CAS Permissions

From: Michael Billard (billardm_at_p-com.com)
Date: 09/26/03


Date: Thu, 25 Sep 2003 16:21:27 -0700


Hi all:

I'm learning more about .NET Framework's built-in
scripting abilities as well as the Framework's security
capabilities. But there is something I'm not clear on and
need some clarification.

Assume I have an application with a function called
SaveOrder, and it uses ADO.NET to connect to SQL Server
and saves a sales order into the database. Also, I am
using Microsoft.Vsa.VisualBasic (the VB.NET scripting
engine) in the same program, and write a VB.NET script
that calls the application's SaveOrder function.

I want to prevent the scripting engine's scripts from
accessing the file system, opening network connections,
creating database connections, and other potentially
dangerous things. I know some of these functions may be
excluded from the scripting engine, but potentially,
others cannot.

Is it possible to "sandbox" the scripts to prevent access
to protected resources while still allowing them to call
SaveOrder and successfully saving information to the
database? Essentially, I want some access to protected
resources from scripts, but in a very carefully controlled
way.

Thanks for your help.



Relevant Pages

  • Re: Pipe Delimited files with headers
    ... but if you're happy with scripting and text ... Here's a sample VBScript that shifts data from a text file into a table ... 'a table in an MDB database without opening Access ... Dim oTDef 'As DAO.TableDef ...
    (microsoft.public.access.externaldata)
  • why should i use tcl?
    ... i'd like to ask about tcl. ... while database and communication may be left common to all ... this requirement makes the use of embeddable scripting language the best ... the sripting language i'd like to use should fit some requirements. ...
    (comp.lang.tcl)
  • Re: Registry deletions
    ... Database Developer ... Someone who looks after 10,000 PCs knows about scripting, so why post here? ... Someone who does not know about scripting could not effectively look after 10,000 PCs. ... Time to align your skills with your job requirements? ...
    (microsoft.public.windowsxp.general)
  • Re: need to do a domain inventory, but cant afford SMS
    ... > inventory of all the equipment. ... For inventory to a csv file using WMI from vbscript (WMI comes default with ... The acquired information is written to a database using ADO." ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.win2000.general)
  • Re: List of Duplicate Users in a Forest
    ... A database and some scripting would be useful. ... > Directory forest with about eight domains. ... > cleanup process until the users have migrated into AD. ...
    (microsoft.public.windows.server.active_directory)