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

Discussion in 'ASP .Net' started by =?Utf-8?B?TiBTIFM=?=, Aug 29, 2004.

  1. 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.
    =?Utf-8?B?TiBTIFM=?=, Aug 29, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?TiBTIFM=?=

    Karl Guest

    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

    "N S S" <> wrote in message
    news:...
    > 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.
    >
    Karl, Aug 29, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?TiBTIFM=?=

    Scott M. Guest

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


    "N S S" <> wrote in message
    news:...
    > 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.
    >
    Scott M., Aug 29, 2004
    #3
  4. =?Utf-8?B?TiBTIFM=?=

    David Jessee Guest

    Check System.Diagnostics.Process.GetCurrentProcess().ProcessName="w3wp"


    "N S S" <> wrote in message
    news:...
    > 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.
    >
    David Jessee, Aug 29, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UG9sYQ==?=
    Replies:
    1
    Views:
    621
    Mark Rae
    Aug 11, 2004
  2. =?Utf-8?B?TiBTIFM=?=
    Replies:
    1
    Views:
    362
    Erik Moore
    Nov 23, 2004
  3. JB
    Replies:
    7
    Views:
    966
  4. Sascha
    Replies:
    0
    Views:
    123
    Sascha
    Jan 14, 2004
  5. Balu Krishna
    Replies:
    0
    Views:
    83
    Balu Krishna
    Feb 21, 2009
Loading...

Share This Page