473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I run two localhost sites at once?

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

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
Nov 19 '05 #1
23 1744
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.Applica tionPath 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/art...&seqNum=2&rl=1

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"darrel" <no*****@hotmai l.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
I'm trying to figure out if I can run to localhost sites at once. Such as
'localhost' and 'site2.localhos t'.

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

Nov 19 '05 #2
> 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.Applica tionPath 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?
you might want to check out:
http://www.informit.com/articles/art...&seqNum=2&rl=1


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
Nov 19 '05 #3
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.

"darrel" <no*****@hotmai l.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
I'm trying to figure out if I can run to localhost sites at once. Such as
'localhost' and 'site2.localhos t'.

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

Nov 19 '05 #4
> 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
Nov 19 '05 #5
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
--
MY ASP.Net tutorials
http://www.openmymind.net/
"darrel" <no*****@hotmai l.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
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.Applica tionPath 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?
you might want to check out:
http://www.informit.com/articles/art...&seqNum=2&rl=1


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

Nov 19 '05 #6
> 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
Nov 19 '05 #7
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/
=============== =============== ========
"darrel" <no*****@hotmai l.com> wrote in message
news:uZ******** ******@TK2MSFTN GP14.phx.gbl...
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

Nov 19 '05 #8
> 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
Nov 19 '05 #9
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/
=============== =============== ========
"darrel" <no*****@hotmai l.com> wrote in message
news:Os******** ******@tk2msftn gp13.phx.gbl...
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

Nov 19 '05 #10

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

Similar topics

6
2349
by: Rich | last post by:
Hi. Whenever I connect to a mysql database, I always connect to 'localhost'. Does that mean that you can connect to a database on another host? If you can, does that mean that I could use the same database for both of my websites (which are hosted with different people)? And if you can, how please? I assume that I would have to create another mysql user, but how would I connect to the database? Thanks. Richard.
1
1870
by: developerqs | last post by:
I have developed an engine that I use for all of my clients web sites. They are all the same type of site, some use features A, B, & C. Some web sites just use features A & B. My issue is that in order for me to make a new site, I am copying the files and then adding in the design/unique look. This makes developing new features and fixing old features a huge hassle because:
3
2375
by: Simon K | last post by:
Hi I am working with sessions to check if the user is logged in. This usually works fine and all my .asp-pages checks if: <% session.Contents("loggedIn")=True %> But this only works on my web-hotel When I run the same pages on my localhost, it can't find any sessions and I appear to not be logged In. I have tried to set my localhost on the "trusted sites" list and "always allow" in "override cookie handling" in my Explorer. But no luck....
7
1865
by: Christoph Lutz | last post by:
Hi, I have got a scenario where an asp script needs to request via xmlhttp a file sitting on the same server. The code all works find on my local machine. However, on the hosting server, it does not. The problem is that I am on a shared server and the server can't "see itself", i.e. it's probably blocked by the host to receive request from itself. The problems comes in as the server will hold multiple sites and use host headers to...
6
3617
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
9
4290
by: darthghandi | last post by:
I am trying to create a server application using asynchronous sockets. I run into a problem when I try to connect to my server using a non-.net program. I can establish the connection, and send some packets in response to the programs first message, but when I receive a response back, it's the last packet I sent. After that packet, I receive the packet I really wanted. This only happens when I connect with local host. I tried...
9
2940
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I got the core of the javascript from here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm I noticed in the demo that sometimes the content takes a long
1
2353
by: maflatoun | last post by:
Hi all, I've been doing ASP.NET C# for 4 years now and that's around the same # of years I've been away from PHP. But now I'm looking at this PHP position that looks really interesting to me. However, I have some unresolved questions setting up my own test enviroment having bunch of sites relative to http://localhost with each site having it's own subdirectories and an include file (ex. Site Navigation with images that's accessible from...
7
2380
by: pek | last post by:
OK, I've been having this problem for quite some time but never until now I really needed a solution. I have never thought of a work around, so I really need your help. Sorry if this has been mentioned already. You can point me to the post and I'll gladly read. I googled this a lot but, first, most people have tutorials for sharing sessions in subdomains, and, second, I have no clue what keywords to use. I am currently developing two web...
0
7997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8065
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.