Issues with multiple website development on Windows 2000 pro box

S

Steve Mauldin

I have three websites that were developed by using the same code in .net.
They are all located under wwwroot on my desktop running windows 2000
pro.because Windows 2000 pro only supports a single Default Web Site I have
to switch the IIS path to test the code on my own box.

Once I boot up, I change the path on the Default Web Site in the Internet
Services Manager to point to project A and I start up the IDE and I select
project A to edit and I then click on the run button and a browser window
opens with the correct apsx page displayed. I close down the IDE and I go
back into Internet Services Manager and change the path on the default Web
Site to project B. I then start up the IDE and I select project B to edit
and I then click on the run button and a browser window opens but instead of
using the path C:\inetpub\wwwroot\B it is using the prior projects path of
C:\inetpub\wwwroot\A. Which causes the incorrect images to appear. I have to
reboot my machine every time I switch from project to project. Can you give
me any hints of how to avoid this or correct it?

Thanks,

Steve Mauldin
 
G

Gabriel Magaña

Can;t you have all the projects running under the same IIS web site? Or
does your code have hardcoded paths that assume the web site is running at
the root?

Anyway, this is a shot in the dark, but I would try a "net stop iisadmin /y"
at the console followed by "net start w3svc" to hopefully get your changed
settings to refresh without restarting the whole machine.
 
S

Steve Mauldin

Gabriel,

These are separate websites and expect to be at the root. www.A.com,
www.B.com , and www.C.com
I'll try stopping the iisadmin and restarting it. I was hoping it was just
a setting I had wrong. Seems a lot of work to
stop and start IIS all the time to be able to develop multiple websites on a
windows 2000 pro box. Also this
problem is occuring on windows XP pro as well.

Thanks for the input,

Steve Mauldin
 
G

Gabriel Magaña

Yeh I had a hunch that you were assuming the web site was running at the
root. Usually it is better to do "~/" references than "/" references, but I
will not attempt to lecture you on that, LOL!

And yes, it is a limitation of non-server O/S placed there by MS so that you
do not buy a workstation machine O/S to function as a real web server.

I know of people that develop on Win2003 servers just for this reason.
 
L

Luke Dalessandro

Steve,

I've run into this frustration before... one way to handle this is to
run each of the sites as a virtual directory with an application enabled
under your Default Web Site directory.

From ASP.NET's perspective each virtual directory is actual it's own
website. So "localhost/A", "localhost/B", "localhost/C" are all independent.

Then when you use controls in websites A, B, and C, you set their paths
using the "~/" prefix which is automatically resolved to the appropriate
application relative path.

ie, ~/images/image.gif would be resolved to
/localhost/A/images/image.gif if it was running in site A.

There will be problems for controls that don't run with the
runat="server" flag set, so if you have lots of plain images, or
absolute links that you aren't running as HtmlControls, they won't show
or link correctly during development.

As far as your specific problem with changing the Default Site
directory, I'm not sure what the answer is... sorry.

Hope this helps,
Luke
 
S

Steve Mauldin

Follow up. This problem is being caused from caching. either the IIS, IDE,
or both are caching files and when the file names are the same I am getting
the older cached file. So images, JS files, etc. from the prior website are
loading in stead of the the new site. Stopping and restarting IIS does not
always clear this problem up and I am still having to reboot. There has to
be a way of stopping the caching of the browser in developemnt mode. Any
ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top