예제 #1
0
파일: PathUtils.cs 프로젝트: FordSoft/CMS
        public static DeployEnvironment GetDeployEnvironment(HttpContext context)
        {
            var result = new DeployEnvironment();

            switch (context.Request.Url.Port)
            {
                case 81:
                    {
                        result.SqlServerConfigBaseDirectory = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1";
                        result.ChildSitesBasePhysicalPath = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1\Cms_Data";
                        result.BaseVirtualPath = "~/Config/demo1/Cms_Data/";
                        result.RootDataFile = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1\Cms_Data";

                        break;
                    }
                case 82:
                    {
                        result.SqlServerConfigBaseDirectory = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2";
                        result.ChildSitesBasePhysicalPath = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2\Cms_Data";
                        result.BaseVirtualPath = "~/Config/demo2/Cms_Data/";
                        result.RootDataFile = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2\Cms_Data";

                        break;
                    }
            }
            if (!string.IsNullOrWhiteSpace(result.RootDataFile))
            {
                result.ContentPath = System.IO.Path.Combine(result.RootDataFile, "Contents");
                result.ContentVirtualPath = result.BaseVirtualPath + "Contents";
                result.AccountPath = System.IO.Path.Combine(result.RootDataFile, "Account");

            }
            return result;
        }
예제 #2
0
파일: PathUtils.cs 프로젝트: FordSoft/CMS
        public static DeployEnvironment GetDeployEnvironment(HttpContext context)
        {
            var result = new DeployEnvironment();

            switch (context.Request.Url.Port)
            {
            case 81:
            {
                result.SqlServerConfigBaseDirectory = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1";
                result.ChildSitesBasePhysicalPath   = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1\Cms_Data";
                result.BaseVirtualPath = "~/Config/demo1/Cms_Data/";
                result.RootDataFile    = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo1\Cms_Data";

                break;
            }

            case 82:
            {
                result.SqlServerConfigBaseDirectory = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2";
                result.ChildSitesBasePhysicalPath   = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2\Cms_Data";
                result.BaseVirtualPath = "~/Config/demo2/Cms_Data/";
                result.RootDataFile    = @"C:\git\Kooboo.Cms\CMS\Kooboo.CMS\Kooboo.CMS.Web\Config\demo2\Cms_Data";

                break;
            }
            }
            if (!string.IsNullOrWhiteSpace(result.RootDataFile))
            {
                result.ContentPath        = System.IO.Path.Combine(result.RootDataFile, "Contents");
                result.ContentVirtualPath = result.BaseVirtualPath + "Contents";
                result.AccountPath        = System.IO.Path.Combine(result.RootDataFile, "Account");
            }
            return(result);
        }