473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

multiple applications, same files...

I have an ASP.NET web application that needs to be rolled out to a
number of clients.
The functionality is the same in all applications, but each client has
its own database.

At the moment, I have one application per client, but most of the
files in the applications are the same, so this is not ideal from a
maintenance point of view.

The only differences between the client applications are:

- Different XML files related to each client
- Different database connection string
- Different application settings

All these differences can be handled from the web.config file.

I want an alternative solution that will reuse the common files, while
running each client's files as a separate application, under the
control of a separate web.config file.

Having a different application for each client allows for security
management across client apps, e.g.:

If I request a file with the URL:

http://www.myapp.com/client1/logon.aspx

I will log on to the application, and then browse to...

http://www.myapp.com/client1/home.aspx

and see content related to client 1.
And if I then request a file with the URL:

http://www.myapp.com/client2/home.aspx

the application will then detect that the user does not have an active
session variable for Client2 and will redirect to Client2/logon.aspx

Recoding of the application or consolidating the databases are not
options at this stage.

Can IIS handle this type of scenario, if so how do I set up my
applications in IIS to implement this?

TIA.
Nov 18 '05 #1
2 1723
This is what I would recommend. Have one directory with your application.
Have separate web.config settings for each client. Such as:

client1XMLFile
client1DBConnString
client2XMLFile
Client2DBConnString

and so on. Basically, have all the settings for all the clients in there,
and the names of the keys have the name of the client (or some sort of ID
that you assigned to the client).

Then have a separate virtual directory for each client. Have IIS redirect
to the real applications logon.aspx, and pass in the id of client. So
redirect to http://www.myapp.com/myapplication/l...spx?id=client1 if
someone browses to http://www.myapp.com/client1.

Now,your application can be modified to look in the query string, and maybe
set a session variable, or something else, to basically have this person
treated as client1 the entire time - and to read the appropriate settings
from web.confg.

Does this make sense?

"Sean" <st****@missionmaker.com> wrote in message
news:cf**************************@posting.google.c om...
I have an ASP.NET web application that needs to be rolled out to a
number of clients.
The functionality is the same in all applications, but each client has
its own database.

At the moment, I have one application per client, but most of the
files in the applications are the same, so this is not ideal from a
maintenance point of view.

The only differences between the client applications are:

- Different XML files related to each client
- Different database connection string
- Different application settings

All these differences can be handled from the web.config file.

I want an alternative solution that will reuse the common files, while
running each client's files as a separate application, under the
control of a separate web.config file.

Having a different application for each client allows for security
management across client apps, e.g.:

If I request a file with the URL:

http://www.myapp.com/client1/logon.aspx

I will log on to the application, and then browse to...

http://www.myapp.com/client1/home.aspx

and see content related to client 1.
And if I then request a file with the URL:

http://www.myapp.com/client2/home.aspx

the application will then detect that the user does not have an active
session variable for Client2 and will redirect to Client2/logon.aspx

Recoding of the application or consolidating the databases are not
options at this stage.

Can IIS handle this type of scenario, if so how do I set up my
applications in IIS to implement this?

TIA.

Nov 18 '05 #2
Thanks for your feedback Marina,

I can see how that would work, however i am trying to find a solution that
leverages the web.configs and existing security in ASP.NET
I want http://www.myapp.com/client1/home.aspx and
http://www.myapp.com/client2/home.aspx
to run as different applications, although the same files are being
referenced.
I know that the URL determines which web.config file to use, so with the
correct setup of virtual directories, it should be possible?
If not, ill try your solution.

Thanks again.

"Marina" <so*****@nospam.com> wrote in message
news:Op**************@tk2msftngp13.phx.gbl...
This is what I would recommend. Have one directory with your application.
Have separate web.config settings for each client. Such as:

client1XMLFile
client1DBConnString
client2XMLFile
Client2DBConnString

and so on. Basically, have all the settings for all the clients in there,
and the names of the keys have the name of the client (or some sort of ID
that you assigned to the client).

Then have a separate virtual directory for each client. Have IIS redirect
to the real applications logon.aspx, and pass in the id of client. So
redirect to http://www.myapp.com/myapplication/l...spx?id=client1 if
someone browses to http://www.myapp.com/client1.

Now,your application can be modified to look in the query string, and maybe set a session variable, or something else, to basically have this person
treated as client1 the entire time - and to read the appropriate settings
from web.confg.

Does this make sense?

"Sean" <st****@missionmaker.com> wrote in message
news:cf**************************@posting.google.c om...
I have an ASP.NET web application that needs to be rolled out to a
number of clients.
The functionality is the same in all applications, but each client has
its own database.

At the moment, I have one application per client, but most of the
files in the applications are the same, so this is not ideal from a
maintenance point of view.

The only differences between the client applications are:

- Different XML files related to each client
- Different database connection string
- Different application settings

All these differences can be handled from the web.config file.

I want an alternative solution that will reuse the common files, while
running each client's files as a separate application, under the
control of a separate web.config file.

Having a different application for each client allows for security
management across client apps, e.g.:

If I request a file with the URL:

http://www.myapp.com/client1/logon.aspx

I will log on to the application, and then browse to...

http://www.myapp.com/client1/home.aspx

and see content related to client 1.
And if I then request a file with the URL:

http://www.myapp.com/client2/home.aspx

the application will then detect that the user does not have an active
session variable for Client2 and will redirect to Client2/logon.aspx

Recoding of the application or consolidating the databases are not
options at this stage.

Can IIS handle this type of scenario, if so how do I set up my
applications in IIS to implement this?

TIA.


Nov 18 '05 #3

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

Similar topics

5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
2
by: Marcus | last post by:
I have seen many posts of people with the same problem as me (attached below), but I have yet to see any solutions posted. Has anyone figured out how to deploy an Asp.net web site to the webserver...
3
by: Sean | last post by:
I have an ASP.NET web application that needs to be rolled out to a number of clients. The functionality is the same in all applications, but each client has its own database. At the moment, I...
3
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I...
11
by: Olie | last post by:
This post is realy to get some opinions on the best way of getting fast comunication between multiple applications. I have scowered the web for imformation on this subject and have just found...
0
by: Thom Little | last post by:
I need to have multiple applications in the same 2.0 webspace. I am using the add-in to Visual Studio 2005 that permits me to do this and it creates namespaces in a manner very similar to 1.1 in...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
3
by: Hartmut Dippon | last post by:
Hi all, I hope somebody can help me with following problem: I have an application where I can drag&drop files/dirs from within explorer onto my form. If multiple files/dirs are selected I...
3
by: | last post by:
I'm seeking (probably basic) guidance on the right way to split a large site that's supposed to represent one domain(mydomain.org) into many small VS.NET projects, and how to avoid issues with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.