I have a library code, which should be aware whether it is executed in the context of a web server or standalone application server.
The obvious that comes to mind i
Gets a value that specifies whether the current Windows Presentation Foundation (WPF) application is browser hosted.
Thats how its done in XBAP
or if you have an appdomain do reflection and get something from it? using