M
Mike Gale
Hi,
I have code that is designed for use in an ASPX execution environment.
I'd like to alter the small amounts of code which are tied to a particular
runtime host so that they work with others.
For example so a component that currently works in an ASP.NET environment
can also work in a desktop or MbUnit situation.
I'm sure I can kludge something that works (like detecting existence of
HttpContext) but that seems primitive, inelegant and wrong. There is
presumably a library that gives me details of the runtime host. I can't
find it.
How should I go about detecting the execution environment / runtime host
from within a CLR 1.1 (and later) assembly?
I have code that is designed for use in an ASPX execution environment.
I'd like to alter the small amounts of code which are tied to a particular
runtime host so that they work with others.
For example so a component that currently works in an ASP.NET environment
can also work in a desktop or MbUnit situation.
I'm sure I can kludge something that works (like detecting existence of
HttpContext) but that seems primitive, inelegant and wrong. There is
presumably a library that gives me details of the runtime host. I can't
find it.
How should I go about detecting the execution environment / runtime host
from within a CLR 1.1 (and later) assembly?