views:

45

answers:

3

There are customers that want to customize to brand my product, while have me conitue to manage and maintain the site. I have seen people doing this by creating customer specific URIs, such as:

    <customer1>.WebSite.com
    <customer2>.WebSite.com
    <customer3>.WebSite.com
    ...

Each customerX identifier is obviously used to load a CSS/HTML composition that would best match the customer's requirements.

How would this be done in ASP.NET? Any serious gotchas I should be aware of? Is it difficult to maintain such an offering if customers are heavily reliant on JS and CSS hacks?

A: 

What do you mean by JS and CSS hacks? You should load different CSS sheets and JS files for each customer site.

SimpleCoder
Of-course. But surely there are problems with just scraping and using a customer's CSS/JS in a different site's look
NewGuyInTown
Yes, their CSS and JS could override functionality you put in, or possibly break something or just plain not work. This is more of a general problem; the more you let the client customize, the more places your application can go wrong.
SimpleCoder
+1  A: 

It's generally much easier to do the customization as a function of the logged in use rather than using domain name structures like this.

If you do wish to go down this path you'll need to set up a wildcard DNS mapping at your DNS provider, you'll also need to examine the Request object either in a custom httpmodule or in some master page or base page class and then set an appropriate CSS stylesheet.

If you are using HTTPS on your site you'll have many more problems to contend with.

Hightechrider
A: 

The basic idea I would use:

  • Is to have a master/template 'site' which contains the default style/content.

  • Set up a site for each customer that points it's resource by default to the master.

  • When the customer wants to customize it, copy it to their site. Change the references in the customer's site to their copy of the resource.


One thing you'll have to watch out for is the customer screwing up their version, and malicious changes to the files.

mikek3332002