Get Current Full App Path?

Discussion in 'ASP .Net' started by xeroxero, Dec 8, 2006.

  1. xeroxero

    xeroxero Guest

    xeroxero, Dec 8, 2006
    #1
    1. Advertisements

  2. Dim fullappname as string = Request.Url.Host
    fullURL.text = "The full URL to the application root is : " & "http://" & fullappname &
    Request.ApplicationPath & "/"

    If you don't need the trailing slash :

    "http://" & fullappname & Request.ApplicationPath



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "xeroxero" < > wrote in message
    news:...
    > With Framework 2.0, what is the best way to get the current full URI
    > of the web application? For example, if a user goes to
    >
    > http://mysite.com/place/subdir
    >
    > and the virtrual directory (web app) is /place
    >
    > how to get
    >
    > http://mysite.com/place ?
    >
    >
    > Thanks.
     
    Juan T. Llibre, Dec 8, 2006
    #2
    1. Advertisements

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. PHaroZ
    Replies:
    5
    Views:
    97,605
    akash02sap
    Aug 17, 2012
  2. Mike Newton
    Replies:
    0
    Views:
    3,144
    Mike Newton
    Jul 23, 2004
  3. VB Programmer
    Replies:
    11
    Views:
    16,745
    JestersTears
    Jun 21, 2010
  4. Benjamin Han
    Replies:
    7
    Views:
    613
    Hartmut Goebel
    Jan 3, 2004
  5. rh00667

    get full path of application

    rh00667, Mar 6, 2007, in forum: C++
    Replies:
    11
    Views:
    4,954
    rh00667
    Mar 7, 2007
  6. Replies:
    26
    Views:
    1,383
    Lew Pitcher
    Jun 4, 2007
  7. SpaceMarine

    helper function - full app path ("~/")

    SpaceMarine, Mar 2, 2009, in forum: ASP .Net
    Replies:
    9
    Views:
    1,170
    SpaceMarine
    Mar 17, 2009
  8. dude
    Replies:
    5
    Views:
    2,038
    Jussi Piitulainen
    Mar 17, 2011
Loading...