Re: Virtual Directory, Paths, Local and Deployed Problem

From: Ken Dopierala Jr. (kdopierala2_at_wi.rr.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 12:57:07 -0500

Hi,

What kind of project are you making that you are pointing the browser to
local resources in a specific directory? Do you actually go to each one of
your client machines and create this directory structure? If that is the
case, you might want to just add to that workload. Create a text file that
you give to the client and copy it to their machine while you are creating
all these directories. Have that text file hold the correct paths for each
client and then use those. Good luck! Ken.

-- 
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
"nick" <nickgieschen@hotmail.com> wrote in message
news:305cab98.0409280841.666dcdfb@posting.google.com...
> I have a problem and I've been using a cheezy work around and was
> wondering if anyone else out there has a better solution.
>
> The problem:
>
> Let's say I have a web application appA. Locally, I set it up as
> C:\domains\appA. Locally, my IIS root points to C:\domains. I don't
> point it to C:\domains\appA since if I have an appB under C:\domains I
> wouldn't be able to get to it. So to access it via my browser I go to
> localhost/appA.
>
> When deployed, the IIS website's root points not to domains, but one
> directory deeper to appA. This is because I don't want to type
> www.appA.com/appA, but just www.appA.com.
>
> So, the above is the typical way of setting up web projects with
> ASP.NET when you've got a local version and a final version on a
> server somewhere.
>
> The problem is with virual paths in the browser. If I want to point to
> an image locally which is in C:\domains\appA\images\myImage.gif in the
> client side code I write "/appA/images/myImage.gif". Obviously this
> doesn't work when deployed since the path from the root is different.
> Rather, the correct path is "/images/myImage.gif".
>
> The work around I've used is locally to switch the root of my website
> everytime I want to work on a different project so that the structure
> of the site mirrors that of the site when deployed. This is obviously
> a big pain in the ***.
>
> The problem would go away if M$ allowed more than one website in IIS
> in non-server versions of their OS, but, well, they don't. That's one
> of the joys I've had doing PHP development on Apache - no screwing
> around with in IIS every time I want to work on a different site
> locally.
>
> So, does anyone have better solutions that the one I've been using?
>
> I realize I could dynamically generate the paths server side, but,
> well, that's a pretty cheezy solution.
>
> Oh yeah, and please remember I'm talking about _client_ side paths. I
> know already about ~/directoryName on the server.