Ejemplo n.º 1
0
        internal static void CreateOmaVDir(string metabasePath, VirtualDirectoryRole role)
        {
            MetabasePropertyTypes.AppPoolIdentityType appPoolIdentityType = MetabasePropertyTypes.AppPoolIdentityType.LocalSystem;
            if (IisUtility.WebDirObjectExists(metabasePath, "oma"))
            {
                string hostName        = IisUtility.GetHostName(metabasePath);
                string appPoolRootPath = IisUtility.GetAppPoolRootPath(hostName);
                using (DirectoryEntry directoryEntry = IisUtility.FindWebObject(appPoolRootPath, "MSExchangeOWAAppPool", "IIsApplicationPool"))
                {
                    IisUtility.SetProperty(directoryEntry, "AppPoolIdentityType", appPoolIdentityType, true);
                    directoryEntry.CommitChanges();
                }
                return;
            }
            CreateVirtualDirectory createVirtualDirectory = new CreateVirtualDirectory();

            createVirtualDirectory.Name      = "oma";
            createVirtualDirectory.Parent    = metabasePath;
            createVirtualDirectory.LocalPath = OwaVirtualDirectoryHelper.OwaCafePath;
            createVirtualDirectory.CustomizedVDirProperties   = OwaVirtualDirectoryHelper.GetOmaVDirProperties(role);
            createVirtualDirectory.ApplicationPool            = "MSExchangeOWAAppPool";
            createVirtualDirectory.AppPoolIdentityType        = appPoolIdentityType;
            createVirtualDirectory.AppPoolManagedPipelineMode = MetabasePropertyTypes.ManagedPipelineMode.Integrated;
            createVirtualDirectory.AppPoolQueueLength         = 10;
            createVirtualDirectory.Initialize();
            createVirtualDirectory.Execute();
        }
Ejemplo n.º 2
0
        private static List <MetabaseProperty> GetOwaCalendarVDirProperties(VirtualDirectoryRole role)
        {
            List <MetabaseProperty> list = new List <MetabaseProperty>();

            list.Add(new MetabaseProperty("Path", (role == VirtualDirectoryRole.Mailbox) ? OwaVirtualDirectoryHelper.OwaPath : OwaVirtualDirectoryHelper.OwaCafePath));
            list.Add(new MetabaseProperty("AuthFlags", MetabasePropertyTypes.AuthFlags.Anonymous));
            list.Add(new MetabaseProperty("AccessFlags", MetabasePropertyTypes.AccessFlags.Read | MetabasePropertyTypes.AccessFlags.Script));
            list.Add(new MetabaseProperty("AppIsolated", MetabasePropertyTypes.AppIsolated.Pooled));
            if (!OwaVirtualDirectoryHelper.IsDataCenterCafe(role))
            {
                list.Add(new MetabaseProperty("AccessSSLFlags", MetabasePropertyTypes.AccessSSLFlags.None));
            }
            return(list);
        }
Ejemplo n.º 3
0
        private static List <MetabaseProperty> GetOmaVDirProperties(VirtualDirectoryRole role)
        {
            List <MetabaseProperty> list = new List <MetabaseProperty>();

            list.Add(new MetabaseProperty("Path", OwaVirtualDirectoryHelper.OwaCafePath));
            list.Add(new MetabaseProperty("AuthFlags", MetabasePropertyTypes.AuthFlags.Basic));
            list.Add(new MetabaseProperty("AccessFlags", MetabasePropertyTypes.AccessFlags.Read | MetabasePropertyTypes.AccessFlags.Script));
            list.Add(new MetabaseProperty("AppIsolated", MetabasePropertyTypes.AppIsolated.Pooled));
            if (!OwaVirtualDirectoryHelper.IsDataCenterCafe(role))
            {
                list.Add(new MetabaseProperty("AccessSSLFlags", MetabasePropertyTypes.AccessSSLFlags.AccessSSL | MetabasePropertyTypes.AccessSSLFlags.AccessSSL128));
            }
            return(list);
        }
Ejemplo n.º 4
0
 internal static bool IsDataCenterCafe(VirtualDirectoryRole role)
 {
     return(role == VirtualDirectoryRole.ClientAccess && Datacenter.IsMicrosoftHostedOnly(true));
 }