How to get IIS application name?

Ask a Question related to ASP, Design and Development.

  1. #1

    Default How to get IIS application name?

    Hi all,

    Is it possible to programmatically get the IIS application
    name at run time? If so, how?

    A software package we bought requires some cache file
    generated on the server, since we have multiple instance
    of the application running on that server (pre-staging,
    staging and production) so we need to configure the web to
    use the correct cache folder at run time based on
    application name.

    here is the set up we try to accomplish:

    cache file location

    A.) C:/cachefolder/pre-staging
    B.) C:/cachefolder/staging
    C.) C:/cachefolder/production

    (a config file will be located at the root of these
    virtual directories)

    [url]http://myserver/pre-staging[/url]
    [url]http://myserver/staging[/url]
    [url]http://myserver/production[/url]

    so at run time, how can we get the application name so
    that :

    if appName = "pre-staging" then map to dir A
    if appName = "staging" then map to dir B
    if appName = "production" then map to dir C

    TIA for any help points me to the right direction is
    appreciated!

    Best Regards,

    Sharon


    Sharon Guest

  2. Similar Questions and Discussions

    1. Flash Remoting Application.cfc & Application.cfm problem
      Hi there, When using Flex 1.5 client application, when using Application.cfm to deal with remoting SetCredentials(user,pwd), I just set it once...
    2. dllimport call in aspnet application makes the application hangs
      As our application design requires us to use one of the validation API engine which was written on C(so basically all I have is a dll) and I tested...
    3. What issue will HIT me hard when I convert an Access 2002 MDE application to Web Application?
      Hi All, Current Access 2002 MDE application: - has no tier - has neither business object nor any kind of object (Except MS Form object and...
    4. Can a web application call methods on a webservice running in the same application
      Can a web application call methods on a webservice running in the same application Thanks Ron Vecchi
    5. How to inherit a base form in all application forms of an asp.net application
      hello friend, while developing an asp.net application, i created a base form(say mybaseform1) with certain links on it. then i tried to...
  3. #2

    Default Re: How to get IIS application name?

    "Sharon" <anonymous@discussions.microsoft.com> wrote in message
    news:044c01c39743$99c7d880$a101280a@phx.gbl...
    > Hi all,
    >
    > Is it possible to programmatically get the IIS application
    > name at run time? If so, how?
    >
    > A software package we bought requires some cache file
    > generated on the server, since we have multiple instance
    > of the application running on that server (pre-staging,
    > staging and production) so we need to configure the web to
    > use the correct cache folder at run time based on
    > application name.
    >
    > here is the set up we try to accomplish:
    >
    > cache file location
    >
    > A.) C:/cachefolder/pre-staging
    > B.) C:/cachefolder/staging
    > C.) C:/cachefolder/production
    >
    > (a config file will be located at the root of these
    > virtual directories)
    >
    > [url]http://myserver/pre-staging[/url]
    > [url]http://myserver/staging[/url]
    > [url]http://myserver/production[/url]
    >
    > so at run time, how can we get the application name so
    > that :
    >
    > if appName = "pre-staging" then map to dir A
    > if appName = "staging" then map to dir B
    > if appName = "production" then map to dir C
    >
    > TIA for any help points me to the right direction is
    > appreciated!
    If you've got different paths, why not just parse out
    Request.ServerVariables("URL") to figure out what script is running?

    --
    Tom Kaminski IIS MVP
    [url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
    [url]http://mvp.support.microsoft.com/[/url]
    [url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]



    Tom Kaminski [MVP] 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