Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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
 
Old December 4th, 2003, 05:06 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accesing Web Folder

Hello all,

I have a folder named hrisoft placed under c:\ (c:\hrisoft).
I have configured this file through IIS to be a virtual directory.When i want to access its files i have to type:
What I want to do is to be able to access these files like this:
Thanks in advance for any possible answers

 
Old December 4th, 2003, 05:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, if you want to do that, I guess you have to point the root of your Web site to c:\hrisoft

So, instead of adding it as a Virtual Directory, open the Properties for Default Web Site (or another name if you have multiple Web sites), and have Local Path on the Home Directory tab point to c:\hrisoft

As far as the name of the server is concerned, is your machine named hrisoft or not? If it's not, the http://hrisoft is not going to work. The client browser needs to now where hrisoft is located. You can do that by adding 127.0.0.1 hrisoft to your lmhost file in your Windows\system32\drivers\etc folder. This way, the browser knows that hrisoft is actually located at 127.0.0.1

This won't work for external machines trying to connect to hrisoft as long as they don't have a valid entry to your machine in their local lmhosts file.

In this scenario, you should also add a Host Header in IIS to your Web site so IIS listens to hrisoft as well. To set this, click the Advanced button on the Web Site tab for your Web site.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 4th, 2003, 05:54 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is kind of restricting isn't it?If i want another Web Site to run I have to put it under hrisoft, right?

Kostas Lagos

 
Old December 4th, 2003, 06:16 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It depends on your IIS version. If you have a "real version", you can create multiple Web sites. Simply right-click your server name or Web sites, and choose New Web site (or something like that). This allows you to create multiple sites. I think that this works fine on Windows Server editions (2000, 2003 etc), but not on XP.

To distinguish between sites, IIS needs a unique profile for each site. Basically, the Host Header name an the port number make up a unique site. So http://MySite and http://YourSite can run on the same machine (port 80 is used as the default port). Also, http://MySite:80 and http://MySite:81 can also run at the same time.

ISPs use host headers to distinguish between sites. So www.yourSite.com and www.MySite.com can both run at one physical machine and IP address, yet the Web server is able to see what site belongs where.

In your case, it all depends on what hrisoft is. If you replace it with Internet IP names (i.e. www.yourSite.com and your machine has the IP address that belongs to this URL), things will work fine.

If hrisoft is a local name and you expect your local machine and other machines in your network to see it it, you'll need to add entries to LMHost or setup a DNS server in your network that takes care of these things.

In all cases, the Host Header in IIS is an important part......

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 4th, 2003, 07:44 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar for all that great info!
I cleared out some things

Kostas Lagos






Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename web site, aspx, folder in VS 2005? cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 9th, 2007 11:40 AM
change permission of folder in web application SachinMalge ASP.NET 2.0 Basics 0 March 12th, 2007 09:31 AM
Unable to add folder 'Add_Data' to the Web hunzian78@yahoo.com ASP.NET 2.0 Basics 0 August 2nd, 2006 11:51 PM
multiple web-inf folder Nia Servlets 0 February 17th, 2005 12:28 PM
RE:Allowing web server to access database folder joshil Access ASP 1 April 18th, 2004 01:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.