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

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
 
A

A Lonely Programmer

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
 
M

mikeb

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top