0

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
Andrea
  • 11,801
  • 17
  • 65
  • 72

1 Answers1

0

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.

Andy Davies
  • 1,456
  • 9
  • 13
  • I don't know how the code is being executed, but ASP Classic pages load just fine under Custom Medium trust. This is an existing application and I am not an expert on the Microsoft stack. The conversion of the application from Full Trust is something that is being forced on us - I can't just say it's not relevant. Going from Full to CustomMedium or Medium breaks on calls to the ADODB library. – Eric Nielsen Jun 06 '12 at 17:59
  • Are you running on IIS 6 or 7? What version of .NET is set against your application pool? If IIS 7 is your site's application pool set to Classic or Integrated pipeline? Does your site have a web.config file? Can you edit your question to include code used to open database connection? – Andy Davies Jun 07 '12 at 13:02
  • IIS 7. .NET 2, but I've tried it with 4 with the same results. Integrated Pipeline. Yes there is a web.config file. Editing OP now. – Eric Nielsen Jun 07 '12 at 15:53