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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top