You can actually just right click the Nop.Web project and choose Add -> Area. This will create an named isolated area for you under a special Area folder and this should work out-of-box with nopCommerce according to the code in their custom view engine (haven’t verified this myself yet). However doing it this way the code is not in a separate .net project/assembly which is what I wanted to continue the existing architecture already present (Nop.Admin) and also have the option of re-usability and easier updates to the code base.
For you current setup you can assign the Host Headers/Names under “Bindings” in IIS7.5 for each of the three sites and still only have one IP. I don’t know squat about certificates; yet. Stackoverflow.com is probably the best place to ask/find out more.
To paint a better picture of doing it as a separate project this was the basic folder setup: (note: your physical folder cannot be the same as your url route or you'll get 403.14 errors)
Nop.Web
Administration (Nop.Admin project files are under here)
App_Data
bin
Content
Controllers
CustomerBackoffice (Backoffice project files are under here)
Views
Shared
_Layout.cshtml (make sure you change code in this file to match the physical folder name)
_ViewStart.cshtml (make sure you change code in this file to match the physical folder name)
...
ThemeableVirtualPathProviderViewEngine.cs
//little hack to get nop's admin area to be in /Administration/ instead of /Nop/Admin/ or Areas/Admin/
if (!string.IsNullOrEmpty(areaName) && areaName.Equals("admin", StringComparison.InvariantCultureIgnoreCase))
{
var newLocations = areaLocations.ToList();
newLocations.Insert(0, "~/Administration/Views/{1}/{0}.cshtml");
newLocations.Insert(0, "~/Administration/Views/{1}/{0}.vbhtml");
newLocations.Insert(0, "~/Administration/Views/Shared/{0}.cshtml");
newLocations.Insert(0, "~/Administration/Views/Shared/{0}.vbhtml");
areaLocations = newLocations.ToArray();
}
if (!string.IsNullOrEmpty(areaName) && areaName.Equals("backoffice", StringComparison.InvariantCultureIgnoreCase))
{
var newLocations = areaLocations.ToList();
newLocations.Insert(0, "~/CustomerBackoffice/Views/{1}/{0}.cshtml");
newLocations.Insert(0, "~/CustomerBackoffice/Views/{1}/{0}.vbhtml");
newLocations.Insert(0, "~/CustomerBackoffice/Views/Shared/{0}.cshtml");
newLocations.Insert(0, "~/CustomerBackoffice/Views/Shared/{0}.vbhtml");
areaLocations = newLocations.Concat(areaLocations).ToArray();
}
ThemableRazorViewEngine.cs
ViewLocationFormats = new[]
{
//themes
"~/Themes/{2}/Views/{1}/{0}.cshtml",
"~/Themes/{2}/Views/{1}/{0}.vbhtml",
"~/Themes/{2}/Views/Shared/{0}.cshtml",
"~/Themes/{2}/Views/Shared/{0}.vbhtml",
//default
"~/Views/{1}/{0}.cshtml",
"~/Views/{1}/{0}.vbhtml",
"~/Views/Shared/{0}.cshtml",
"~/Views/Shared/{0}.vbhtml",
//Admin
"~/Administration/Views/{1}/{0}.cshtml",
"~/Administration/Views/{1}/{0}.vbhtml",
"~/Administration/Views/Shared/{0}.cshtml",
"~/Administration/Views/Shared/{0}.vbhtml",
//CustomerBackoffice
"~/CustomerBackoffice/Views/{1}/{0}.cshtml",
"~/CustomerBackoffice/Views/{1}/{0}.vbhtml",
"~/CustomerBackoffice/Views/Shared/{0}.cshtml",
"~/CustomerBackoffice/Views/Shared/{0}.vbhtml"
};
PartialViewLocationFormats = new[]
{
//themes
"~/Themes/{2}/Views/{1}/{0}.cshtml",
"~/Themes/{2}/Views/{1}/{0}.vbhtml",
"~/Themes/{2}/Views/Shared/{0}.cshtml",
"~/Themes/{2}/Views/Shared/{0}.vbhtml",
//default
"~/Views/{1}/{0}.cshtml",
"~/Views/{1}/{0}.vbhtml",
"~/Views/Shared/{0}.cshtml",
"~/Views/Shared/{0}.vbhtml",
//Admin
"~/Administration/Views/{1}/{0}.cshtml",
"~/Administration/Views/{1}/{0}.vbhtml",
"~/Administration/Views/Shared/{0}.cshtml",
"~/Administration/Views/Shared/{0}.vbhtml",
//CustomerBackoffice
"~/CustomerBackoffice/Views/{1}/{0}.cshtml",
"~/CustomerBackoffice/Views/{1}/{0}.vbhtml",
"~/CustomerBackoffice/Views/Shared/{0}.cshtml",
"~/CustomerBackoffice/Views/Shared/{0}.vbhtml"
};