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

  • Thread starter Thread starter NWx
  • Start date Start date
N

NWx

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
 
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 said:
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
 
Back
Top