Home All Groups Group Topic Archive Search About

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

Author
22 Dec 2006 11:41 PM
Nathan Sokalski
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
njsokal***@hotmail.com
http://www.nathansokalski.com/

Author
23 Dec 2006 4:51 AM
Cor Ligthert [MVP]
Nathan,

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

Cor

Show quoteHide quote
"Nathan Sokalski" <njsokal***@hotmail.com> schreef in bericht
news:OppbqKiJHHA.5104@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
> njsokal***@hotmail.com
> http://www.nathansokalski.com/
>
Author
23 Dec 2006 7:58 AM
Nathan Sokalski
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
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:%23vEXB3kJHHA.1248@TK2MSFTNGP03.phx.gbl...
> Nathan,
>
> Try never to use fixed paths in webdeveloping; use the virtual path's,
> src="images/Logo.gif"
>
> Cor
>
> "Nathan Sokalski" <njsokal***@hotmail.com> schreef in bericht
> news:OppbqKiJHHA.5104@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
>> njsokal***@hotmail.com
>> http://www.nathansokalski.com/
>>
>
>