Determining if object is run in web or win32

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Determining if object is run in web or win32

    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 Guest

  2. Similar Questions and Discussions

    1. Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available.
      Does anyone know of an alternate method to contact Dave Roth (other then rothd@roth.net )? It appears that his entire domain is unavailable...
    2. Win32-PerfMon on Win32
      Windows 2000(SP4) ActivePerl 5.8.3 I found this escapade rather confusing, I'm warning you now. I cannot install this Win32-PerfMon module, I...
    3. Win32::Service Determining which are set to start automatically
      Hi everyone, I am trying to write a script that checks to make sure all services that are set to start automatically are running. If they are...
    4. Determining if a var is a number
      This probably is a simple problem but I have been struggling with it for some time. I am trying to determine if a user supplied variable is a...
    5. Determining the referring URL
      I have a page with frames. The left frame is a list of urls. The main frame is loaded based on the url that was clicked in the left frame. Is...
  3. #2

    Default Re: Determining if object is run in web or win32

    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
    [url]http://Steve.Orr.net[/url]


    "WebDevHokie" <mwitczak@rkeng.com> wrote in message
    news:uTPdIlkRDHA.2232@TK2MSFTNGP11.phx.gbl...
    > 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 Guest

  4. #3

    Default Re: Determining if object is run in web or win32

    Determine from the process name see Process

    "WebDevHokie" <mwitczak@rkeng.com> wrote in message
    news:uTPdIlkRDHA.2232@TK2MSFTNGP11.phx.gbl...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139