I've created a custom Central Admin .aspx page that inherits from the OperationsPage base class, which is defined in Microsoft.SharePoint.ApplicationPages.Administration.dll. Naturally, I added a reference to that assembly to my project. That particular assembly is not in the GAC, but rather, is located in the C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\CONFIG\ADMINBIN directory.
So I can deploy my page and run it, and all is well. The trouble comes when I try to load my assembly (the one that references Microsoft.SharePoint.Application.Administration.dll) using Assembly.Load(). The runtime complains that it can't locate the Microsoft.SharePoint.ApplicationPages.Administration.dll assembly (technically, it doesn't complain until I call GetTypes() on the assembly after it's been loaded).
I thought maybe if I tried to load that assembly into memory first using Assembly.LoadFile(path), and passing in the absolute path to the assembly (mentioned above), then maybe .NET would be able to find it later when my assembly gets loaded. Unfortunately, the call to Assembly.LoadFile(path) throws an exception with the message "Failed to grant permission to execute".
Anybody have any thoughts?