Json Rich
Json Rich

Reputation: 13

IIS Multi-Site using same code base

I setup a Kentico CMS to host multiple sites and I'd like to know if it would be a good practice to setup multiple website in IIS using the same code base? I'm using IIS 8 on Windows 2012 R2

Upvotes: 0

Views: 1526

Answers (1)

Bryan
Bryan

Reputation: 196

Chel,

I don't think having multiple IIS applications point to a single codebase is a good idea. Kentico will add/update/delete several files within your application folder as part of it's normal processing. Having multiple IIS applications performing this action on the same folder on the file system will introduce complications and errors due to file permissions and access rights.

You could set up your solution a few ways, depending on how you wanted to manage your applications.

  1. Single IIS application / Host Headers

In this scenario, you would have a single IIS application / folder. All sites would be delivered from the same codebase. All traffic would be redirected to the same IP. In your IIS configuration, you would use host headers for each URL you wanted to send to your site. In Kentico, you would have a license / domain alias for each site you wanted to server.

PROS

This set up would give you a single codebase to manage your applications. This can simplify a good bit of your maintenance and hot fixing.

CONS

If you have to restart any of your sites for any reason, all of your sites will go down at once.

  1. Separate codebase / IIS application for each site

In this setup, you would replicate your codebase for each site you wanted to deliver. You would create an IIS application for each codebase, configured for the appropriate URL. Each domain would be directed to the appropriate IIS application.

PROS

Can isolate your application. Can provide the ability to use different .NET frameworks / configurations for each app.

CONS

Several codebases to maintain. Updates to all sites require duplication of code across all codebases.

Personally, I would recommend option 1 if all of your sites are on the same .NET framework and it is not critical if they have to be restarted. If any of them are critical LOB applications, you may consider branching that one application off to it's own IIS application pool / codebase.

Upvotes: 1

Related Questions