Home | Advertising Info18 USERS CURRENTLY ONLINE   
   Site Search Contact Us Saturday, December 20, 2014  
 
 







DISCUSSION ARCHIVES
DISCUSSION ARCHIVES 2
DISCUSSION ARCHIVES 3
BLOG

 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 
 


Use ASP to determine the Physical Path Of Your Virtual Website




Here is an example if you are hosting your Domain on some random ISP and you want to know the structure of the web site without asking them. 

The Mapath Method Is your ticket.

Run the following code from within the root of your site and it will clue you in to the physical path.

<p align="center"><font size="4" face="Arial"><b>
The Physical path to this virtual website is:
</b></font>

<font color="#FF0000" size="6" face="Arial">
<%= Server.MapPath("\")%>
</font></p>

Server.MapPath is a great tool, but it isn't always the best solution. It is great for applications that need to work from any directory or site they are thrown into but there are times when you just don't need to use it. All Server.MapPath really does is figure out the physical path on the fly. Using it is really no different then knowing the path except every time Server.MapPath is called you are using server resources to determine the physical path. Also. when called from all sorts of different directories Server.MapPath will report back all sorts of different paths making it pretty difficult to use with an application that uses include files for specifying the database path. The solution...

Just use Server.MapPath once to determine the physical path ..
There is a Physical Path despite what your host may have told you.
   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2014 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com