Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS6, Web Sites, Virtual directory and Server.MapPath problems

Status
Not open for further replies.

itechy

IS-IT--Management
Jan 13, 2003
8
0
0
US
Okay, to start.

I am running IIS6 on a single IP and using headers to redirect to the correct sites.

I have 2 sites setup:

C:\Web Sites\abc

c:\Web Sites\xyz

I have created an application for both, don't know whether that is important but I'll put it in anyway.

They both work fine as they are with no problems, but I wish to reference site xyz also like so:


Again this works fine and IIS6 setups a default application for the Virtual Directory underneath
The issue is when using the Server.MapPath command to reference a database in C:\Web Sites\xyz when visiting it at
Confused yet??

What happends is that by using Server.MapPath("\db.mdb") when at it returns:
C:\Web Sites\abc

As you can see this is not what I want. I have tried all weird and wonderful combinations still no joy.

Please, please help, I am tearing my hair out :(

Many Thanks

Tim

PS. If anyone has an easy to understand way of explain virtual paths, let me know ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top