Web Application Architecture Problem

Hi all,

BusinessLogicLayer (C# Class Library)
DataAccessLayer (C# Class Library)
Website1.UI (website1.domainname.com)
Website2.UI (website2.domainname.com)
Website3.UI (website3.domainname.com)

I am developing an application where a user will log into a website and depending on the users login details they will be redirected to a particular section of the application. The application is very large and I would ideally like to split the sections into separate websites. Therefore the user will log into a website and then be redirected to the site that they have access right too. The application is far too large to just have separate sub directories in one website and use web.config files to handle authorisation and I would like to use the following standard architecture to achieve the goal of separation and easy build and maintenance of projects.

However I have a few questions regarding this solution:

1)      Once logged into one website how do you pass authentication across to another site?
2)      All sites share common UI elements such as style sheets, master pages etc. How can this be achieved?
3)      Is this architecture the wrong solution for the project? If so does anybody have any recommendations?

Many thanks

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nope this Structure is not wrong,

How ever you should try and setup your application like this

MasterApplication (this will handle all your authentication)
--- SubSite (subdomain1.yoursite.com)
--- SubSite (subdomain2.yoursite.com)
--- SubSite (subdomain3.yoursite.com)
Which means all this three application are using web.config file of their own and the master web.config

CraglyAuthor Commented:
thanks for getting back to me so quickly.

How would this be structured in Visual Studio? If possible I would of liked to keep the websites in thier own projects so that they can be built and maintained independantly so I could make changes to one site and just deploy that sites new dll. Is this possible?

what version of Studio Are you using ?

First you should open a Solution (mind you not a project, you should find that under Other Project Types)

then Under that solution add a new Web Project say MyMaster, HTTP, VB or C# as per your choice localhost/myMaster

then add a new webproject say myChildOne, HTTP, VB or C# as per your choice, Localhost.myMaster/MyChildOne

and so on.

CraglyAuthor Commented:
I am using VS 2008

I am not sure what you mean. Are you saying that I have a solution l like this:

   MyMaster (Website)
   MyChildOne (Website)
   MyChildTwo (Website)

Then within IIS have the sites set up as a virtual directories under the MyMaster website?
How would authentication work between the sites. If you logged into the main site and then be redirected does the authentication remain? Or do I loose it?

Many thanks
You should use Master Sites Application Scope for your varialbles.

or Pass a Authentation token in Query String.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.