Determining if object is run in web or win32

Discussion in 'ASP .Net' started by WebDevHokie, Jul 9, 2003.

  1. WebDevHokie

    WebDevHokie Guest

    Is there a way that you can tell if an object is run under a web or a win32
    environment? I have an object ( Data Access Object) that uses the ASP.NET
    cache. I have also implemented unit testing into the application (using
    NUnit). These unit tests call the application which call the Data Access
    Object which uses the cache. I want to be able to say, if this is run under
    the win32 environment, dont use the cache. I guess I could check to see if
    the cache object is null, but was just curious if there was another way
    around that. Thanks in advance!
    WebDevHokie, Jul 9, 2003
    #1
    1. Advertising

  2. You could check to see if the current context is null, but checking for the
    existence of the cache as you mentioned seems just as simple.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "WebDevHokie" <> wrote in message
    news:...
    > Is there a way that you can tell if an object is run under a web or a

    win32
    > environment? I have an object ( Data Access Object) that uses the ASP.NET
    > cache. I have also implemented unit testing into the application (using
    > NUnit). These unit tests call the application which call the Data Access
    > Object which uses the cache. I want to be able to say, if this is run

    under
    > the win32 environment, dont use the cache. I guess I could check to see

    if
    > the cache object is null, but was just curious if there was another way
    > around that. Thanks in advance!
    >
    >
    >
    Steve C. Orr, MCSD, Jul 9, 2003
    #2
    1. Advertising

  3. WebDevHokie

    Ben Guest

    Determine from the process name see Process

    "WebDevHokie" <> wrote in message
    news:...
    > Is there a way that you can tell if an object is run under a web or a

    win32
    > environment? I have an object ( Data Access Object) that uses the ASP.NET
    > cache. I have also implemented unit testing into the application (using
    > NUnit). These unit tests call the application which call the Data Access
    > Object which uses the cache. I want to be able to say, if this is run

    under
    > the win32 environment, dont use the cache. I guess I could check to see

    if
    > the cache object is null, but was just curious if there was another way
    > around that. Thanks in advance!
    >
    >
    >
    Ben, Jul 10, 2003
    #3
    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. Paul Cook
    Replies:
    0
    Views:
    439
    Paul Cook
    Nov 6, 2003
  2. Robin Becker

    Determining win32 dll dependency

    Robin Becker, Aug 15, 2005, in forum: Python
    Replies:
    2
    Views:
    469
    Robin Becker
    Aug 15, 2005
  3. travel2light
    Replies:
    10
    Views:
    473
    Andrew Thompson
    Mar 10, 2008
  4. Alfonso
    Replies:
    2
    Views:
    92
    Alfonso
    Dec 1, 2006
  5. Replies:
    4
    Views:
    170
Loading...

Share This Page