How to Identify whether Dll is running From ASP.NEt or Window Appl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I had Requirement to Autmatically format the Messages using HMTL if the
DLL is running from ASP.NET otherwise use standard Formating when DLL is
Executed from Windows application.

How can i achieve this.
 
N S S,
I'm not sure if there's a better way, but one way I believe you could tell
is to check if System.Web.UI.HttpContext is null. If it is, you aren't in a
web app.

Karl
 
How about checking the user account that the application is running under?
Most web apps run under the ASPNET user account.
 
Back
Top