Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Get Current Full App Path?

Reply
Thread Tools

Get Current Full App Path?

 
 
xeroxero
Guest
Posts: n/a
 
      12-08-2006
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.
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      12-08-2006
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" <(E-Mail Removed) > wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Full Path of current directory ? (ASP.net) PHaroZ ASP .Net 5 08-17-2012 08:39 AM
how do you get current full aspx page name with querystring? VB Programmer ASP .Net 11 06-21-2010 12:13 PM
Options for generic full-text search without using database-specific full-text engine? Samuel R. Neff ASP .Net 2 06-10-2005 06:53 PM
Re: How to get user's full name using HttpContext.Current.User Steve C. Orr [MVP, MCSD] ASP .Net 0 07-23-2004 10:14 PM
Re: How to get user's full name using HttpContext.Current.User Mike Newton ASP .Net 0 07-23-2004 03:56 PM



Advertisments