Asp Classic with ADODB needs to migrate to Medium Trust

288 views Asked by At

I have a very large project written largely in ASP classic. It uses ADODB (recordsets mostly) in several thousand files. It is mandatory to move the project to Medium trust, although that can be customized. Attempting to load the ADODB.dll under Medium Trust causes:

System.Security.SecurityException: That assembly does not allow partially trusted callers.

  1. I couldn't find a way to disable that control from a CustomMedium Trust level. Is there such a thing?

  2. Is there any other way to load the old ADODB under Medium Trust? I can't figure out how to strong name ADODB as it is not open source.

  3. Is there an other library that is similar enough to ADODB that it can be substituted for it, perhaps an open source one that could be strong named?

  4. Any other ideas that don't involve migrating thousands of pages to ASP.NET/ADO.NET?

The specific call that breaks the application is

using ADODB;
...
namespace appLib
{
    public Recordset recordset;
    private void init()
    {
        ...
        this.recordset = new RecordsetClass();  //This throws SecurityException
1

There are 1 answers

3
Andy Davies On

The concept of TRUST is specific to .NET and not to Classic ASP. Unless you are running the classic .asp code using the .NET handler concepts of TRUST are not relevant.