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. Advertising

  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. 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. PHaroZ
    Replies:
    5
    Views:
    94,683
    akash02sap
    Aug 17, 2012
  2. Mike Newton
    Replies:
    0
    Views:
    2,872
    Mike Newton
    Jul 23, 2004
  3. Replies:
    26
    Views:
    1,003
    Lew Pitcher
    Jun 4, 2007
  4. SpaceMarine

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

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

Share This Page