B
Barry Kelly
I'm designing an application framework which will, amongst other things,
live in an assembly hosted in the ASP.NET worker process, servicing
webservice requests.
Here's the scenario:
APPFX is our application framework assembly. It has no life of its own -
it's designed to provide components that are glued together by another, main
application assembly - let us call it APP. Thus, APP uses APPFX, and APP is
registered with ASP.NET as a handler (<httpHandlers> in web.config). This
means that ASP.NET shadow-copies APP and APPFX to different directories and
loads them up.
Now, APP isn't very interesting on its own - it's designed to load up an
application description from XML metadata, and from instructions in that XML
load up an arbitrary number of other assemblies, say PART_1..PART_N.
Here's the problem: there's a conflict between two different usage
scenarios:
1) APP uses PART_x.
-------------------
If APP uses PART_x, then ASP.NET will shadow-copy PART_x to some directory
and load it up. It will be already existing in the AppDomain. APPFX should
interpret a request for something PART_x as a request for something in the
in-memory PART_x.
2) PART_y is only mentioned in XML metadata.
--------------------------------------------
PART_y is not in the AppDomain, so APPFX needs to interpret a request to
PART_y as a request to load PART_y into the current AppDomain.
Questions:
----------
* If APPFX is to go down the ASP.NET route of shadow-copying, what strategy
should it use?
* How can APPFX hook into ASP.NET's shadow-copying algorithm?
* What method should APPFX use to determine if ASP.NET has already
shadow-copied and loaded the assembly (given that the XML metadata only has
the base name (e.g. 'part_z.dll') of the assembly)?
Currently the code is using the brutal hack of recursively searching for the
shadow-copied assembly in the root of the BIN directory of the shared web
folder.
Bear in mind that all these assemblies are currently in development at a
fairly early R&D prototype stage with no strong names.
-- Barry Kelly
Avaeon Solutions
live in an assembly hosted in the ASP.NET worker process, servicing
webservice requests.
Here's the scenario:
APPFX is our application framework assembly. It has no life of its own -
it's designed to provide components that are glued together by another, main
application assembly - let us call it APP. Thus, APP uses APPFX, and APP is
registered with ASP.NET as a handler (<httpHandlers> in web.config). This
means that ASP.NET shadow-copies APP and APPFX to different directories and
loads them up.
Now, APP isn't very interesting on its own - it's designed to load up an
application description from XML metadata, and from instructions in that XML
load up an arbitrary number of other assemblies, say PART_1..PART_N.
Here's the problem: there's a conflict between two different usage
scenarios:
1) APP uses PART_x.
-------------------
If APP uses PART_x, then ASP.NET will shadow-copy PART_x to some directory
and load it up. It will be already existing in the AppDomain. APPFX should
interpret a request for something PART_x as a request for something in the
in-memory PART_x.
2) PART_y is only mentioned in XML metadata.
--------------------------------------------
PART_y is not in the AppDomain, so APPFX needs to interpret a request to
PART_y as a request to load PART_y into the current AppDomain.
Questions:
----------
* If APPFX is to go down the ASP.NET route of shadow-copying, what strategy
should it use?
* How can APPFX hook into ASP.NET's shadow-copying algorithm?
* What method should APPFX use to determine if ASP.NET has already
shadow-copied and loaded the assembly (given that the XML metadata only has
the base name (e.g. 'part_z.dll') of the assembly)?
Currently the code is using the brutal hack of recursively searching for the
shadow-copied assembly in the root of the BIN directory of the shared web
folder.
Bear in mind that all these assemblies are currently in development at a
fairly early R&D prototype stage with no strong names.
-- Barry Kelly
Avaeon Solutions