HighTechTalks DotNet Forums  

Multiple instances of web application

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss Multiple instances of web application in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old   
Jim Underwood
 
Posts: n/a

Default Re: Multiple instances of web application - 11-03-2005 , 02:53 PM






Joe,
What you are suggesting is basically 3 different web sites, running 3
different applications. Sure, they may be using the same code, but as far
as IIS goes they are as different as any 3 other websites. Just think of it
as setting up 3 different web sites in IIS, regardless of the code that runs
in each.


"Joerg Schrocke" <speedy1179 (AT) web (DOT) de> wrote

Quote:
We need this, because we want to use the webApp for different projects.
Each
project should have its own webApp with the own web.config, where for
example the connection string is stored. Each wepApp has its own database.

Joerg

"CT" <carstent (AT) spammersgoawayintegrasol (DOT) dk> wrote in message
news:OmfaiHH2FHA.3864 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Okay, so you want this URL, http://servername/webapp1 to point to the
\inetpub\wwwroot\webapp1 physical folder on disk,
http://servername/webapp2
to point to the \inetpub\wwwroot\webapp2 folder, and
http://servername/webapp3 to point to the \inetpub\wwwroot\webapp3
folder,
right? Now, you then need a copy of your code in each of these folders,
and
I guess this is where your original question is very valid; can this be
problematic. Yes, it can, depening on which resources your application
accesses. If you access a database, your code should handle concurrency
issues, and you might want to go with optimistic concurrency. Having
said
that, any Web application needs to handle concurrency issues as you can
have
multiple users online simulteanously. In fact, just about all
applications
need to cater for concurrency issues these days. :-)

Now, the problem with the suggested setup is if you have any application
wide settings saved to application state, as this isn't possible across
your
different Web apps. Well, at least it isn't possible without some
quirks,
if
you know what I mean. If you happen to save to a file on disk there are
also
potential problems, because of locking issues.

I'm sure there are other things to look out for, but to keep it short,
your
idea can work. Now that's out of the way, can you possibly tell me why
you
want to do it this way?


--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Joerg Schrocke" <speedy1179 (AT) web (DOT) de> wrote in message
news:%23lC3KmG2FHA.3188 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
I want have a folder for each web app. For example:

..inetpub/wwwroot/webapp1
..inetpub/wwwroot/webapp2
..inetpub/wwwroot/webapp3

Joerg

"CT" <carstent (AT) spammersgoawayintegrasol (DOT) dk> wrote in message
news:eYLSOYG2FHA.3924 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Joerg,

Yes, this is possible. The only question is if you want all of the
URLs
to
point to the same physical folder, or if you want a copy of the Web
app
in
a
seperate folder for each URL?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Joerg Schrocke" <speedy1179 (AT) web (DOT) de> wrote in message
news:%23vg6YiB2FHA.268 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hello!

Yes, we have or want to have several copies of a wep app on the
iis.
I
sthis
possible or what you mean with using naming convention.

We wan to use the web app following.

http://ipaddress/WebApp1
http://ipaddress/WebApp2
http://ipaddress/WebApp3

Many thanks,

Joerg
"CT" <carstent (AT) spammersgoawayintegrasol (DOT) dk> wrote in message
news:eawYn5s1FHA.2076 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Joerg,

I am not sure exactly what you mean. If you mean multiple client
(browser)
connections/sessions with a single Web app, then no problem. This
is
the
"default" setup. If you mean having severeal copies of the same
Web
app
running on IIS simulteneanously, which I suspect you do, you would
at
least
a way of "separating" the instances using say a naming convention.
I'm
not
sure what the purpose is, but perhaps this is related to a Web
farm
and/or
scalability?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Joerg Schrocke" <speedy1179 (AT) web (DOT) de> wrote in message
news:%23lSJTUk1FHA.3524 (AT) tk2msftngp13 (DOT) phx.gbl...
Hello!

Can run multiple instances of a web application in one IIS or
could
i
get
some problems with them?

Many thanks!

Joerg

















Reply With Quote
  #12  
Old   
manger22
 
Posts: n/a

Default Re: Multiple instances of web application - 11-21-2005 , 08:28 PM







It seems to me like this really the hard way of going about things.

It sounds like you have one web application but you have thre
different databases (one for each project). I assume that over tim
you'll add more projects, at which point you'll create a new databas
and add another copy of your web app to the web server.

Wouldn't it be easier and more maintainable to only have one copy o
your application running on the IIS box, but use different host header
to access it?

In IIS you can configure just about as many host-headers as you wish
assigning a name and an IP address to each.

So, it'd look something like this.

IIS:
IP: Some IP Host Header: project1.yourdomain.com
IP: Some IP Host Header: project2.yourdomain.com

Then slap some keys in your web.config file for each project...

Something like this...
<add key="HostHeader.Project1" value="project1.yourdomain.com"/>
<add key="HostHeader.Project2" value="project2.yourdomain.com"/>

You'll need to put a connection string property in your web.config fo
each of those keys as well...

When you get to the point where you would normally grab the connectio
string from the config, first grab the host header, here is the cod
for that...

string strHostHeader
HttpContext.Current.Request.ServerVariables["HTTP_HOST"].ToLower().Trim();

Then just grab the connection string for that host header...

I just finished reading what I wrote, that got pretty long, boring da
at work...

Mik

--
manger2



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.