Can I run two localhost sites at once?

D

darrel

I'm trying to figure out if I can run to localhost sites at once. Such as
'localhost' and 'site2.localhost'.

It appears I can set both of them up, but not run them at the same time. Is
that true? If so, what was MS thinking? Ugh.

Alternatively, is there a practical way to have a site run from a directory
within your root folder and somehow have it still obey root-relative links?

-Darrel
 
K

Karl Seguin

A site can differ by either the IP address, the hostname or the port.

Windows XP Pro doesn't support running multiple sites because some people
would likely use it to do stuff they aren't supposed to (like run a bad
hosting company off of it).

normally you solve link issues in ASP.Net by using a number of tools, such
as ~ in the path, Request.ApplicationPath and stuff like that. You
shouldn't develop an application to work at the root or not, it should work
in both situations.

you might want to check out:
http://www.informit.com/articles/article.asp?p=101145&seqNum=2&rl=1

Karl
 
D

darrel

Windows XP Pro doesn't support running multiple sites because some people
would likely use it to do stuff they aren't supposed to (like run a bad
hosting company off of it).

That is the dumbest excuse I've ever heard for MS crippling a product. ;o)

OK, not the dumbest, but right up there. ;oD
normally you solve link issues in ASP.Net by using a number of tools, such
as ~ in the path, Request.ApplicationPath and stuff like that. You
shouldn't develop an application to work at the root or not, it should work
in both situations.

That seems like good advice, but wouldn't it always have to be at the root
for root-relative linking?

Root Path Reference Syntax seems nice, but is only a server-side solution. I
still have to deal with all my client side links to CSS files, js, images,
and static html files.

*sigh*

-Darrel
 
K

Kevin Spencer

If you're running Windows Server 2003, you can set up as many web sites as
you want. On a Windows XP Pro box, you can set up only one. But you can set
up as many separate web applications in that site as you need.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.
 
D

darrel

If you're running Windows Server 2003, you can set up as many web sites as
you want. On a Windows XP Pro box, you can set up only one. But you can set
up as many separate web applications in that site as you need.

It boggles the mind that MS would purposely annoy the very developers that
keep the .net thing going...

I guess we're gluttons for punishment.

-Darrel
 
K

Karl Seguin

Well, I'm no official spokesperson for MS, I'm guessing that's why, but I
could be way off :)

You never know what changes might come, so forcing one way is bad. I've been
in many reorgs where an independent site suddenly became a sub-site of
another one. When it comes to many of your client files such as css and js,
you are hopefully using master pages which makes this a lot less painful.
But I agree it isn't a global solution. Nonetheless, I would still hope
that you would consider trying to build it flexible enough to work both ways
(custom server controls can really help too!)

Karl
 
J

Juan T. Llibre

re:
I guess we're gluttons for punishment.

Nah.

You're only laboring under the mistaken notion that
server OS's should be as cheaply priced as client OS's.

If you want a server OS, pay for it.
Otherwise, don't complain about client OS capabilities.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
D

darrel

You never know what changes might come, so forcing one way is bad. I've
been
in many reorgs where an independent site suddenly became a sub-site of
another one.

That's true, though the better way to handle that is to use subdomains
(IMHO, of course).

In our case, we're two developers with complete control over the site(s).
Right now we have our existing .net site and are building our new .net site.
I need to maintain the old while building the new, hence the need/preference
to have two sites on my local machine.
When it comes to many of your client files such as css and js,
you are hopefully using master pages which makes this a lot less painful.

Nope. But close to it. We decided to hold off until we move to .net 2 for
that type of implementation. In this case, we're mainly using 'smart'
controls in the HEAD to maintain those types of links...so that's a valid
point...a lot of this I can handle server-side.

-Darrel
 
D

darrel

You're only laboring under the mistaken notion that
server OS's should be as cheaply priced as client OS's.

My Mac running OS8 could run multiple web sites. There's nothing special
about it. It's just MS crippling for the sake of crippling so they can
sucker more IT departments into increased upgrade/licensing fees.
If you want a server OS, pay for it.

Or get one of the many free ones, or OSX. Or...
Otherwise, don't complain about client OS capabilities.

I will complain about MS pissing on the very developers that maintain MS's
status quo.

I don't think my next job will be in an MS shop, that's for sure. ;O)

-Darrel
 
J

Juan T. Llibre

re:
Or get one of the many free ones, or OSX. Or...

It's your choice.

re:
I don't think my next job will be in an MS shop, that's for sure.

Sorry to see you'll miss out on a bunch of web server improvements,
only because you think that a client OS should be as cheap, or be
as equally-featured, as a server OS.

Go with the "free" ( which are not so "free" ).
You'll get what you pay for.

I wish you luck with your decision.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
B

Bruce Barker

sure, you just have to setup the name resolution in your hosts file.
localhost set set to 127.0.0.1 just add an entry :

site2.localhost 127.0.0.1

then in iismgr create a new site with the new hostname. you could also use
different port numbers instead of different host names.

note: only nt server supports creating more than 1 site per server, so be
sure your dev box is running nt server (2000 or 2003).


-- bruce (sqlwork.com)
 
D

darrel

Or get one of the many free ones, or OSX. Or...
It's your choice.

Unfortunately, it's not. I'm but one frustrated voice amongst a
long-entrenched MS-shop. :|

Maybe someday, though...there's some cracks forming as we're looking at all
the upgrade licenses coming through.
Sorry to see you'll miss out on a bunch of web server improvements,
only because you think that a client OS should be as cheap, or be
as equally-featured, as a server OS.

It's not an OS issue. The web server is just a program running on the OS.
This is just arbitrary slicing and dicing by MS. Its competitors all seem to
be able to run multiple sites in their servers...are you saying the richest
software company on the planet can't offer the same? ;o)
Go with the "free" ( which are not so "free" ).
You'll get what you pay for.

No, you really don't get what you pay for these days with software. In fact,
more often than not, you end up just paying for headaches. Lately, I'm
finding that if the decision is between an OS product and a commercial
project, you might as well pick the OS because half of the time, even if
it's 'free', it will have better peer support and more frequent upgrades
than the commercial option.

I like .net. It's a nice technology, but this silly IIS restriction is just
another strike against it.
I wish you luck with your decision.

Thanks!

-Darrel
 
D

darrel

then in iismgr create a new site with the new hostname.

How? As far as I can tell, this is a feature that has been stripped out of
Win2k/XP.
note: only nt server supports creating more than 1 site per server, so be
sure your dev box is running nt server (2000 or 2003).

Oh, yea...exactly. So I guess the answer is to get IT to upgrade our
workstations to server OSes. I'll see if they bite. ;o)

-Darrel
 
J

John Timney \(ASP.NET MVP\)

Its not been stripped out - its just never been included in it.........

if your trying to develop subdomains/subsites on a workstation product,
which its not designed for by the manufacturer - why not just install
virtualPC and put a server image on it. Then you wont break your
workstation.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
K

Kevin Spencer

You just don't get it. Microsoft makes no secret whatsoever about what comes
bundled with the various OS's they produce and sell. Neither is Microsoft
under any "moral" obligation to sell any feature in any software package,
any more than any company selling any product has a "moral" or "ethical"
obligation to include any feature in any product they sell. You get what
Microsoft indicates you will get if you buy the package, and that is the
agreement you make by purchasing the package, just as with any other product
made by any other company. Microsoft advertises that you will get thus and
such when you buy thus and such a product. You agree to buy the product for
the price that Microsoft is selling the product for. In other words, "you
get what you pay for."

It would be just as logical, by your argument, to complain that a cheaper
model of an automobile doesn't include Cruise Control. Yet, the automobile
company makes no claim that it will include Cruise Control. Of course, if
the company made both versions of the automobile the same, why would anyone
buy the more expensive one? Why would they need to make 2 versions? And why
would they cost 2 different prices?

You claim to be a programmer, yet your argument lacks logic, and when
confronted with logic, you bullishly defend your illogical position. For a
programmer, the only thing worse than making a logical mistake, is defending
the illogical mistake, and not fixing it. This leads to bad software.

It is illogical to dislike Microsoft without logical reason. It is also
illogical to maintain that you "really don't get what you pay for these days
with software. In fact more often than not, you end up just paying for
headaches." As I have pointed out, you get exactly what you pay for when
buying software (at least from reputable companies like Microsoft). As for
"headaches," that is simply part of the programmer's landscape. Software is
written by humans, quite a few of them as illogical as you are. And the
complexity of software and computing technology makes it difficult to keep
up with. If you were not aware of these environmental factors when you
decided to become a developer, hopefully you are now.

If you think that the grass is greener on the "non-Microsoft" side of the
fence, you're in good company. Perhaps a stint there would help you figure
out what you really want to do with your life. Of course, there are 2 ways
to obtain wisdom: by experience, and by listening to those with experience.
The first way is the more painful of the two, but they work equally well.
Take your pick.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.
 
G

George

Take a look at my article
http://www.codeproject.com/aspnet/Multisite.asp

I think it's exactly what you are looking for.

George

I'm trying to figure out if I can run to localhost sites at once. Such as
'localhost' and 'site2.localhost'.

It appears I can set both of them up, but not run them at the same time. Is
that true? If so, what was MS thinking? Ugh.

Alternatively, is there a practical way to have a site run from a directory
within your root folder and somehow have it still obey root-relative links?

-Darrel
 
D

darrel

Its not been stripped out - its just never been included in it.........

That might be an issue of semantics. From what I've been reading, the
capabilities are there in the form of various config files, but the
interface to do this via IIS Manager isn't there.
if your trying to develop subdomains/subsites on a workstation product,
which its not designed for by the manufacturer - why not just install
virtualPC and put a server image on it.

It's really an issue of comparison. When every other modern OS/web server on
the planet can do this out of the box, but MS's can't, one gets the feeling
that MS is just holding back for more cash. ;o)

More power to them, I suppose. ;o)

VPC would be nice, though.

-Darrel
 
D

darrel

You just don't get it. Microsoft makes no secret whatsoever about what
comes
bundled with the various OS's they produce and sell. Neither is Microsoft
under any "moral" obligation to sell any feature in any software package

You'd think MS would want to compete in the marketplace based on features
and quality of product, though. Of course, if they make money doing it the
old MS way, I can't knock them for it. Business is business.
It would be just as logical, by your argument, to complain that a cheaper
model of an automobile doesn't include Cruise Control.

No. The analogy would be if the 50k Cadillac Escalade required an upgrade to
use the reverse gear while the Honda Civic had it built in at 10K. ;o)

Granted, they'd still be selling 50K Cadillacs...
You claim to be a programmer

I program. Not sure if I'd call myself a programmer.
yet your argument lacks logic, and when
confronted with logic, you bullishly defend your illogical position. For a
programmer, the only thing worse than making a logical mistake, is defending
the illogical mistake, and not fixing it. This leads to bad software.

Letting the marketing department dictate your companies product lines also
leads to bad software (yes, I'm pointing at you Microsoft. ;o)
It is illogical to dislike Microsoft without logical reason.

They don't put quality of product at the forefront of their mission. Any
company that does that begins to get on my nerves. MS isn't alone in this,
many of the large software companies do this...namely anyone selling
'enterprise' software.

MS does some great things, they also do some infuriating things. I praise
their great things but don't defend their infuriating things. Besides, they
can take some criticism.
It is also
illogical to maintain that you "really don't get what you pay for these days
with software.

It's completely logical when you work in an organization that has spent
millions on some truly horrendous enterprise software products. It's
completely logical when you spend a year researching content management
tools and getting a pretty good look at the bloated, craptastic products out
there. It's completely logical when you find an OS product that does the
same things, but costs a fraction, and has a much livelier P2P support
group.

Now, I'm not saying commercial software = crap and OS software = great. I'm
saying price is not usually an indicator of quality of product in the
software world these days. There's truly crappy expensive software just as
there are truly amazing mid-priced software products.
As I have pointed out, you get exactly what you pay for when
buying software (at least from reputable companies like Microsoft).

We bought IIS, VS.net licenses, server licenses, workstation licenses, yet
the richest software company on the planet can't get VS.net to stop spitting
out invalid HTML nor their browser to support it. It's the simple things
like that discredot the 'reputable' comment a bit. ;o)
As for
"headaches," that is simply part of the programmer's landscape.

True, true.
If you think that the grass is greener on the "non-Microsoft" side of the
fence, you're in good company.

Yea, that was kind of my point. ;o)

It's not necessarily greener, but there's more people playing on that lawn,
it seems. ;o)

-Darrel
 

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

Top