How do I determine in a .Net DLL whether it's running in a Windows GUI application or web service? I've got a low level class which is being shared between two applications and need to disable message boxes when it's used in a web service.
The Windows application has over 200 solutions and I'm not in a position to re-factor the existing code. The web service needs to reuse some functionality and I'm looking for a quick fix.