Solved

dynamic asp.net site creation

Posted on 2014-02-26
3
281 Views
Last Modified: 2014-03-20
Hi all,

I am looking at implementing a subscription site, whereby the user will sign up and the site will automatically create a database driven site in IIS under a subdomain.

After they sign up a database will be copied from a parent blank db (or from as script?) and the site will be created from a parent blank site.

The folder structure would be as follows;

<Parent Dir>
- <Top Level Site>
- <User Site 1>
- <User Site 2> etc

Now there may be some bespoke configuations made to each site, hence why the parent blank site would be copied. This doesnt help however when the parent site is updated as the changes would not iterate down.

Is it possible (as joomla does), to operate an override situation?. I.e. if the file doesnt existing in the user directory it falls back to the Parent directory?

Any input on this would be grateful.
0
Comment
Question by:flynny
  • 2
3 Comments
 
LVL 25

Expert Comment

by:SStory
ID: 39900332
Well, you could create a site, or you could just write the database and pages so that they look like individual sites, but are only one.  You could do the URL rewriting so that something like:
whateversite.com?company_id=1
is rewritten on the fly to say
whateversite.com/company_name

and have them think they have their own site and every hit to the DB in would know which company id to use.  That is one option.  Otherwise in order to secure each site from the other it would seem to me that it would be done at the OS level, but I could be wrong.
0
 

Author Comment

by:flynny
ID: 39905922
Hi,

Sorry I missed you comment.

Utilising your method as mentioned above, how would I handle any changes to templates etc?

For example if the site were to be customised? (i.e. a masterpage tweaked, etc).

Does that make sense :S
0
 
LVL 25

Accepted Solution

by:
SStory earned 500 total points
ID: 39917467
Well, I don't know exactly what your db is going to do. Assuming you are doing this from scratch and not using Joomla, etc, couldn't you have SQL Server or MySQL back end and every table have a company_ID field and by that you get just the data for that company?  Also one of the tables could have the filename of the master page for that company in a folder of master pages for all companies if need be and it could default to the default master page for companies that don't need to deviate??
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now