Find the server part of the url, and the virtual root folder

Discussion in 'ASP .Net' started by NWx, Feb 17, 2004.

  1. NWx

    NWx Guest

    Hi,

    Is there any way to get the server part of the URL, without parsing
    request.url by myself?
    And also, how van I get the virtual root folder of my application?

    Thanks
     
    NWx, Feb 17, 2004
    #1
    1. Advertising

  2. > Is there any way to get the server part of the URL, without parsing
    > request.url by myself?


    You might want to check out the uri class

    i think uri.authority might be what you are looking for

    "NWx" <> wrote in message
    news:...
    > Hi,
    >
    > Is there any way to get the server part of the URL, without parsing
    > request.url by myself?
    > And also, how van I get the virtual root folder of my application?
    >
    > Thanks
    >
    >
     
    A Lonely Programmer, Feb 17, 2004
    #2
    1. Advertising

  3. NWx

    mikeb Guest

    NWx wrote:
    > Hi,
    >
    > Is there any way to get the server part of the URL, without parsing
    > request.url by myself?
    > And also, how van I get the virtual root folder of my application?
    >


    Server : Request.Url.Host

    Path: Request.Url.AbsolutePath - in this case you will need to do a bit
    of parsing to get rid of the file requested (if there is one in the
    URL), if you just want the directory


    --
    mikeb
     
    mikeb, Feb 17, 2004
    #3
    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. Cortes
    Replies:
    4
    Views:
    1,433
    Cortes
    Jun 8, 2004
  2. Jon Maz
    Replies:
    12
    Views:
    4,975
    Vadim Chekan
    Jul 1, 2004
  3. Steve Franks
    Replies:
    20
    Views:
    4,543
    doodilydoodily
    Dec 7, 2009
  4. Jéjé
    Replies:
    2
    Views:
    411
    Jéjé
    Nov 30, 2005
  5. Mr. X.

    Find root folder of the site.

    Mr. X., Jan 31, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    384
    Juan T. Llibre
    Jan 31, 2009
Loading...

Share This Page