Execution permission cannot be acquired on SqlConnection open() within .NET exposed as COM

From: Dax Westerman (daxwesterman_at_hotmail.com)
Date: 08/21/03


Date: 21 Aug 2003 11:40:24 -0700


I have an application in ASP that I am attempting to migrate to
ASP.NET, and in the course of this migration I've become snarled in a
.NET security issue on which I need some expert help. From the 50,000
ft level, I've got a .NET project that wraps database access
(SqlConnection for one), and in turn this class is wrapped by another
.NET classes that's been exposed as a COM object. This COM interface
was created for use in an ASP page.

As of yesterday afternoon, I was able to call the COM reference, and
the appropriate database interaction took place within the
aforementioned .NET classes, no sweat. However, after this morning's
WindowsXP update (grumble), security on the machine got slammed down,
and I've had to claw my way back to pseudo-functionality. This was
achieved by using the .NET 1.1 wizard to give full trust to the
generated assemblies in the bin of my web app.

Currently, I can access the COM interface and use its methods.
However, when I try to "open" a SqlConnection member variable, I get

Execution permission cannot be acquired

Notes of interest:
- I can run the same code via a test app in .NET, and everything works
great.
- There are two .NET projects being used, one wrapping database access
and a second one calling it. The second one exposes the interface.
Neither is named or has a key or anything like that (I don't pretend
to know where to start with that, yet, as I'm still new to it, and I'm
not sure it's part of my problem.)
- I've added full trust to the System.Data assembly as well. I
actually had everything working for a few minutes, then the magic
passed, so I'm not sure it had any effect.

Can anyone give me some insight into the direction I should be going
to solve this issue?

Thank you very much,
Dax



Relevant Pages

  • ASP to COM to .NET Interoperability Problem
    ... We have an ASP application which needs to access a .NET application through ... We have implemented this interface with a multithreaded COM object ... The .NET dll contains interface code to the .NET application to be ... debugger where we find a memory access violation error. ...
    (microsoft.public.win32.programmer.ole)
  • Re: Cannot load .NET COM Object into ASP (Classic) Application Object
    ... This is an important distinction and the root of your issue. ... The root of my issue is that the .NET CCW uses its own interface for the ... specific CLSID in order to load an object into the ASP Application object. ... Microsoft .NET Components fail the agility test that Active ...
    (microsoft.public.dotnet.framework.interop)
  • COM Interop - Access to the path XXX is denied.
    ... (read/write). ... the class library provides a COM interface, ... will be used in good old asp pages. ... i reference it from a console test application. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASP Web Development
    ... Take a look at www.foxweb.com to interface with VFP. ... but I've been happy with Foxweb. ... > also told by someone else that ASP is very slow and not worth it, use PHP ...
    (microsoft.public.fox.programmer.exchange)
  • Language/Environment/API suggestions
    ... I have a large project that I'll be programming for the next few ... It'll be a complete application, with interface, computation code and ... database access of various databases ...
    (comp.programming)