473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Working in a subdirectory when using ASP.NET & Visual Studio .NET 2005

I am creating an ASP.NET application in a subdirectory of what IIS uses as
the root directory (C:\Inetpub\wwwroot\). I am using the version of IIS that
comes with Windows XP Pro SP2. Some of my code in my ASP.NET application
uses root-relative URLs, such as /images/background.gif. However, because
the subdirectory my application is in is not the root directory of IIS, I
cannot test my application on my machine. Is there any way to avoid this
problem?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Dec 22 '06 #1
5 1218
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:Op**************@TK2MSFTNGP06.phx.gbl...
>I am creating an ASP.NET application in a subdirectory of what IIS uses as
the root directory (C:\Inetpub\wwwroot\).
Is there a specific reason you did that...?

You mention "ASP.NET application" (as opposed to a "site") and VS.NET 2005,
so I'm assuming you've installed either WAP or SP1...

Why don't you simply create a new ASP.NET application under the usual folder
and drop your files into that - I'm sure if you do that, all will be well
again...
Dec 23 '06 #2
Nathan,

Try never to use fixed paths in webdeveloping; use the virtual path's,
src="images/Logo.gif"

Cor

"Nathan Sokalski" <nj********@hotmail.comschreef in bericht
news:Op**************@TK2MSFTNGP06.phx.gbl...
>I am creating an ASP.NET application in a subdirectory of what IIS uses as
the root directory (C:\Inetpub\wwwroot\). I am using the version of IIS
that comes with Windows XP Pro SP2. Some of my code in my ASP.NET
application uses root-relative URLs, such as /images/background.gif.
However, because the subdirectory my application is in is not the root
directory of IIS, I cannot test my application on my machine. Is there any
way to avoid this problem?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Dec 23 '06 #3
The reason I did that is so that I can work on multiple sites on my
computer. If I were to use C:\Inetpub\wwwroot\ as the root directory for
everything I worked on on my machine, I would end up with multiple files
with the same name, ambiguous class names, etc.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ey**************@TK2MSFTNGP02.phx.gbl...
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:Op**************@TK2MSFTNGP06.phx.gbl...
>>I am creating an ASP.NET application in a subdirectory of what IIS uses as
the root directory (C:\Inetpub\wwwroot\).

Is there a specific reason you did that...?

You mention "ASP.NET application" (as opposed to a "site") and VS.NET
2005, so I'm assuming you've installed either WAP or SP1...

Why don't you simply create a new ASP.NET application under the usual
folder and drop your files into that - I'm sure if you do that, all will
be well again...

Dec 23 '06 #4
in general I do, but in some cases (such as when creating controls that will
be used in pages that are in different directories, or for values in
Web.config's appsettings section) it is either easier or more efficient to
do it this way. But either way, I need a way to test my application on my
Windows XP Pro SP2 version of IIS and have it treat the folder my
application is in as the root directory.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Nathan,

Try never to use fixed paths in webdeveloping; use the virtual path's,
src="images/Logo.gif"

Cor

"Nathan Sokalski" <nj********@hotmail.comschreef in bericht
news:Op**************@TK2MSFTNGP06.phx.gbl...
>>I am creating an ASP.NET application in a subdirectory of what IIS uses as
the root directory (C:\Inetpub\wwwroot\). I am using the version of IIS
that comes with Windows XP Pro SP2. Some of my code in my ASP.NET
application uses root-relative URLs, such as /images/background.gif.
However, because the subdirectory my application is in is not the root
directory of IIS, I cannot test my application on my machine. Is there any
way to avoid this problem?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/


Dec 23 '06 #5
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:uv**************@TK2MSFTNGP02.phx.gbl...
The reason I did that is so that I can work on multiple sites on my
computer. If I were to use C:\Inetpub\wwwroot\ as the root directory for
everything I worked on on my machine, I would end up with multiple files
with the same name, ambiguous class names, etc.
??? Each virtual directory is totally isolated from the others as far as IIS
is concerned.

I have maybe 30 different web apps on my development machine, all of which
use the same base classes shared in Visual SourceSafe, all of which have a
file called web.config, all of which have a file called default.aspx etc,
all of which are entirely separate virtual directories etc.

The structure goes like this:

My Documents
Visual Studio 2005
Projects
<project1>.root
<project1>_app
<folder1>
<folder2>
default.aspx
web.config
<project1>_deploy
Debug
Release
<project1>_deploy.wdproj
<project2>.root
<project2>_app
<folder1>
<folder2>
default.aspx
web.config
<project2>_deploy
Debug
Release
<project2>_deploy.wdproj

Etc
Dec 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: vamichael | last post by:
When I try to run the Website Administration Tool from my published application using http://localhost/myapp/webadmin.axd I am getting a "resource not found" error message. I can use the...
2
by: Jeff | last post by:
No response in the vstudio.general group so... I currently have Visual Studio 6 Enterprise and Visual Studio .NET 2003 Enterprise Architect installed. I am about to install Visual Studio 2005...
2
by: Nathan Sokalski | last post by:
I am creating an ASP.NET application in a subdirectory of what IIS uses as the root directory (C:\Inetpub\wwwroot\). I am using the version of IIS that comes with Windows XP Pro SP2. Some of my...
4
by: =?Utf-8?B?Znc=?= | last post by:
Is there a way to config a asp.net app subdir's web.config so that the sub dir becomes a new IIS application in Visual Studio 2005? I need this because the authentication mode for the subdir is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.