Professional Web Applications Themes

Application Path - ASP.NET General

Hi, How can I get the application virtual path in Web.Config file? Thanks a lot,...

  1. #1

    Default Application Path

    Hi,

    How can I get the application virtual path in Web.Config file?

    Thanks a lot,


    Salim Guest

  2. #2

    Default Re: Application Path

    Hi,

    web.config is XML file. what do you mean when you write: getting the
    path *in* web.config ?

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Guest

  3. #3

    Default Re: Application Path

    The web.config file is a set of static values. It can't get anything. What
    exactly do you want to know?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    Neither a follower nor a lender be.

    "Salim Afar" <com> wrote in message
    news:%phx.gbl... 


    Kevin Guest

  4. #4

    Default Re: Application Path

    Sorry,
    you're not stupid I'm stupid.
    Not Web.config file, Global.asax file.
    I always mixes them.
    Sorry again.I'm working hardly for 2 days.



    "Natty Gur" <com> wrote in message
    news:%phx.gbl... 


    Salim Guest

  5. #5

    Default Re: Application Path

    No one is stupid :-)

    string path = HttpContext.Current.Request.ApplicationPath ;

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Guest

  6. #6

    Default Re: Application Path

    Thanks Natty,

    I can not use Request class in Global.asax file because Request needs a page
    class.
    If you try it in Global.asax you get an error.
    So I need something with different way.




    "Natty Gur" <com> wrote in message
    news:phx.gbl... 


    Salim Guest

  7. #7

    Default Re: Application Path

    Hi,

    your code is running in the Global.asax as a result of request. you cant
    access the request directly but httpcontext.current return the context
    of the current call and the request object is one of the context
    properties.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Guest

Similar Threads

  1. Setting Return Path Application Wide
    By Kevin Favro in forum Coldfusion Server Administration
    Replies: 1
    Last Post: May 25th, 01:21 AM
  2. Web Application folder path
    By JV in forum ASP.NET Building Controls
    Replies: 1
    Last Post: March 31st, 08:59 AM
  3. How to get the application path
    By Arjen in forum ASP.NET General
    Replies: 0
    Last Post: July 27th, 01:06 PM
  4. how to get application path ?
    By Lloyd Dupont in forum ASP.NET General
    Replies: 1
    Last Post: July 18th, 02:39 PM
  5. New Path for Application
    By Matt DuBois [MSFT] in forum Windows Networking
    Replies: 0
    Last Post: July 7th, 11:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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