Detecting Running Environment

Jun 1 2008 3:15 PM

Is there any way that a dll written in C# 2.0 can detect if it is running as part of a windows app or part of a web app? The reason is that I wish to have a dll holding all of my back end classes for an application which is going to hav 2 front ends, 1 a windows application and the other a web application. What I need is to detect whether the app using the dll is the web or windows app so that it knows whether or not it can use things such as messageboxes to return error messages.

 

If anyone knows an anser to this then I would be really grateful.


Answers (1)