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

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.
 
K

Karl

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
 
S

Scott M.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top