473,406 Members | 2,549 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,406 software developers and data experts.

A bit of Architecture advice.. One code.. Multiple sites

Hi there,

I am building a website for a group that has 4 companies under it. The
sites are fairly similar so i want to be able to use the same set of
code in the App_Code folder.. I also want to share controls between
the sites. What i am after is a bit of advice as to best practice to
achieve this. Obviously this seems to be a good use of themes so i
will do this to use diffrerent colours where appropriate.. My main
concern is how to differentiate between the sites on any page load so
the correct logo and theme is used.

1) What variable is best to store the current site id in so that it
can be accessed by all pages??

2) Is there a way that all sites can appear to be at the root of the
folder, one method i thought as to have the main page redirect to a
folder in the main app (ie www.website1.co.uk would redirect to root/
website1/) but i dont really want this to happen, is there a way to
mask this folder so it appears that the website1 folder is at the root
of the address bar would i use reg ex for this??

Sorry if this sounds confuing but any advice would be greatlty
appreciated

Anthony

Jul 9 '07 #1
3 1511
1) What variable is best to store the current site id in so that it
can be accessed by all pages??
A more elegant solution would be to have all customizable settings in a
single xml file Companies.xml with an xml node for every company. The users
will be redirected to something like Start.aspx?companyId=1. The Start.aspx
will get the company parameters from Companies.xml and apply them to the
current session.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
<an***********@googlemail.comwrote in message
news:11*********************@n60g2000hse.googlegro ups.com...
Hi there,

I am building a website for a group that has 4 companies under it. The
sites are fairly similar so i want to be able to use the same set of
code in the App_Code folder.. I also want to share controls between
the sites. What i am after is a bit of advice as to best practice to
achieve this. Obviously this seems to be a good use of themes so i
will do this to use diffrerent colours where appropriate.. My main
concern is how to differentiate between the sites on any page load so
the correct logo and theme is used.

1) What variable is best to store the current site id in so that it
can be accessed by all pages??

2) Is there a way that all sites can appear to be at the root of the
folder, one method i thought as to have the main page redirect to a
folder in the main app (ie www.website1.co.uk would redirect to root/
website1/) but i dont really want this to happen, is there a way to
mask this folder so it appears that the website1 folder is at the root
of the address bar would i use reg ex for this??

Sorry if this sounds confuing but any advice would be greatlty
appreciated

Anthony

Jul 9 '07 #2
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uj**************@TK2MSFTNGP02.phx.gbl...
>1) What variable is best to store the current site id in so that it
can be accessed by all pages??

A more elegant solution would be to have all customizable settings in a
single xml file Companies.xml with an xml node for every company. The
users will be redirected to something like Start.aspx?companyId=1. The
Start.aspx will get the company parameters from Companies.xml and apply
them to the current session.
Yes definitely.

I do this for a whole group of my clients (musical groups, in this case)
whose websites I maintain. Each website has a "Login" button which redirects
to a single secure site and passes an encrypted QueryString containing the
client identifier. Each client has a profile stored in SQL Server and, when
the site first opens, it reads in and decrypts the client identifier and
then selects the client's individual MasterPage. Each client has a
completely seperate MasterPage, CSS etc which means that there is only one
actual site which is customised for each individual client.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 9 '07 #3
Thanks for the replies,

What about the actual domain name, for example i dont want it to just
redirect to a sub folder but would like all the ages to appear at the
root, is it pssible to mask

www.site1.com/site1/about.aspx to www.site1.com/about.aspx

and

www.site2.com/site2/about.aspx to www.site2.com/about.aspx

It would also be nice to stop people typing in

www.site1.com/site2/about.aspx and getting site 2's about page under
site 1 domain???

Is this possible??

Jul 9 '07 #4

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

Similar topics

1
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...
5
by: DKode | last post by:
I have created an application that will be used for my IT depts. Tasks. I believe I have created the correct architecture but it doesn't feel correct. Could I get opionions if I am headed in the...
0
by: Natehop | last post by:
I've been attempting to design an n-tiered framework leveraging .NET's strongly typed Dataset. My Framework will serve as the foundation to several client apps from Windows applications to web...
0
by: DKode | last post by:
Ok, My company is asking me to build a portal site for managers. I think I have it down how I will structure the app, using C# and module based pages like in the ibuyspy portal example. I plan...
4
by: Tim McOwan | last post by:
Hi all, I could use some advice really, as I'm a developer who works on my own in a company with no-one else to talk to who can understand me :-( I've been asked to write a production...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
0
by: Brian | last post by:
Tim- Might I suggest you take a look at book by WROX titled ASP.NET Website Programing Problem - Design - Solution Visual Basic .net Edition The ISBN is 1-86100-816-3 This book offers some...
4
by: Heath Kelly | last post by:
I need advice on correct usage of ADO.NET in an ASP.Net environment. I have an ASP.Net application that accesses data through a referenced class library. Things start to break down when multiple...
6
by: Griff | last post by:
Hi I'm after some advice about the architecture to employ for a web front-end. First, I'll describe the system. We host several customers' back-office systems (which are identical) and which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
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,...
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
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...
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...
0
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,...
0
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...

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.