 |
BOOK: ASP.NET Website Programming Problem-Design-Solution  | This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

October 2nd, 2004, 04:58 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Relative URLs?
Hello,
I don't know if I have to use Relative URLs in my web app or not. I want to host it with a hosting company. For example when I need to refer a page in the same root directory (using Relative URLs) I can write this "/thephile/AnotherPage.aspx"? this will work when I host my application?
Thanks,
Marenela
|
|

October 2nd, 2004, 10:19 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
"/thephile" is the name of the virtual directory for the application. If you use a low-end hosting company, they don't let you define your own virtual directories. Your application has to run under the root directory of the web site.
Path names will not have "/thephile". For example, the home page of my site is http://www.ericengler.com/Default.aspx (you don't see /thephile).
Inside my site, all paths are relative to root, not "/thephile".
Eric
|
|

October 3rd, 2004, 04:39 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello Eric,
I know that the "thePhile" is a virtual Directory but what's the web application root directory? I don't know it.
I'm using relative URLs like "/thePhile/default.aspx" what I have to change if I will need to host this website on a company that support visrtual directories?
Thanks,
Marenela
|
|

October 3rd, 2004, 02:32 PM
|
|
Authorized User
|
|
Join Date: Mar 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Eric,
I've been wondering about this issue, too.
What's your recommendation for working smoothly locally, and also smoothly being able to deploy to a managed host...repeatedly. I've been wondering what to do, as my deploy date draws nearer.
Does the Application Name setting in IIS have any relevance here?
|
|

October 3rd, 2004, 07:03 PM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
from the time that I started learning ASP.NET i was wondering about how the virtual directory of my application like the "/thePhile" can be deployed? when I host my application do I have to make some pointer?
I mean for example www.thephile.com will point to "/thePhile"?
what's the diffirence between virtual root directory and application root direcoty?
Thanks Eric
Marenela
|
|

October 3rd, 2004, 08:58 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The application root is where the application lives. If you've installed the app into a virtual directory, then that will be the application root.
The virtual root is the folder that is used when you just specify the hostname without any folders.
For example: when you type "http://localhost/", this is referencing the virtual root folder. How can you determine which folder is used on the harddrive, and what file will come up in your browser?
What does the word "virtual" mean? It's like an alias. A virtual directory is one that is seen with a web path - it has http:// in it, instead of a drive letter. IIS manages virtual directories.
Check out the IIS manager under administrative tools. Look at the default web site. Do you see ThePhile listed under it? Right-click on it and bring up properties to see which hard drive directory is used for this. Where is the virtual root? Right-click on the Default web site, properties, home directory tab.
Please don't misunderstand how hard it is to change the application to reside in the virtual root. Normally this isn't a hard change, but ThePhile has a lot of hard-coded pathnames, both in the source code, and even in some database fields. This is not a 5 minute change.
Eric
|
|

October 4th, 2004, 04:46 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
So this is what I understand from your explanation.
There are 3 expressions here
1- Virtual root
2- Virtual Directory
3- Application root
The Application root is where we put our solution lives so if we installed it in a virtual directory this will be the application root.
The Virtual Directory is a virtual path created with IIS to map to a folder in the hard drive.
The Virtual Root is http://mywebsite.com which refers to a folder too. Or http://localhost/ which refer to the folder c:\InetPub\wwwRoot?
So thePhile is a virtual directory living inside the virtual root of the website and this means that I can have many virtual directories (and in this case creating many applications) in the same default website http://localhost/thePhile or http://localhost/myfirstweb ?
Please tell me if I understand it right.
Ok now you said that. There are companies which offer virtual directories so if I host my thePhile application with it I will do no changes?
Another very important question. Now the thePhile is a virtual directory can I create a new website (on my local IIS) and map the virtual root to thePhile? www.thePhile.com ?
Thanks
Marenela
|
|

October 5th, 2004, 04:20 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
?? any answer guys :-)
Thanks,
Marenela
|
|

October 5th, 2004, 03:10 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I think you understand it right:
http://localhost => c:\InetPub\wwwRoot (virtual root)
http://localhost/ThePhile => c:\Wrox\ThePhile (virtual dir, and application root)
http://localhost/ThePhile/books => c:\Wrox\ThePhile\books (not a virtual dir)
You can't create more than 1 web site with a Pro version of Windows. This is a limit imposed by Microsoft. If you have a server version of Windows you can create multiple web sites on the same computer.
However, all hope is not lost! You can change the location of the virtual root (also called the home directory). You can map the home directory to:
c:\Wrox\ThePhile
But, like I said, this will break the application as it's written now.
Eric
|
|

October 6th, 2004, 04:06 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello Eric,
You mean that I can develop under the http://localhost/thePhile and when I finish I will change the virtual root of the local website from c:\InetPub\wwwRoot to c:\Wrox\ThePhile and everything will be fine?
of course I will be using relative URLs like "images/thePhile.gif" not "/thePhile/images/thePhile.gif" right?
Thanks,
Marenela
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Base URLs - FCKeditor |
retroviz |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 |
2 |
January 9th, 2008 02:23 AM |
| Automatic URLs |
bodenzord |
Forum and Wrox.com Feedback |
2 |
January 4th, 2005 04:19 PM |
| urls |
muhammadtahir4000 |
HTML Code Clinic |
1 |
December 9th, 2004 04:41 AM |
| Complex URLs |
wells |
XSLT |
3 |
June 16th, 2004 04:17 AM |
| Automatic URLs |
Imar |
Forum and Wrox.com Feedback |
13 |
June 19th, 2003 03:01 AM |
|
 |