Exemple #1
0
        public static void DisableFba(DirectoryEntry virtualDirectory)
        {
            string iisserverName = IsapiFilterCommon.GetIISServerName(virtualDirectory);
            string iislocalPath  = IsapiFilterCommon.GetIISLocalPath(virtualDirectory);

            OwaIsapiFilter.SetFlags(iisserverName, iislocalPath, OwaIsapiFilter.FormsAuthPropertyFlags.None);
        }
Exemple #2
0
        public static bool IsFbaEnabled(DirectoryEntry virtualDirectory)
        {
            string iisserverName = IsapiFilterCommon.GetIISServerName(virtualDirectory);
            string iislocalPath  = IsapiFilterCommon.GetIISLocalPath(virtualDirectory);

            return(OwaIsapiFilter.IsFbaEnabled(iisserverName, iislocalPath));
        }
Exemple #3
0
        internal static void Uninstall(DirectoryEntry virtualDirectory, string filterName)
        {
            string iisserverName = IsapiFilterCommon.GetIISServerName(virtualDirectory);
            string iislocalPath  = IsapiFilterCommon.GetIISLocalPath(virtualDirectory);
            string text          = null;
            string str           = null;
            string text2         = null;

            IisUtility.ParseApplicationRootPath(iislocalPath, ref text, ref str, ref text2);
            IsapiFilter.RemoveIsapiFilter("IIS://" + iisserverName + str, filterName);
        }
Exemple #4
0
        public static void UninstallIfLastVdir(DirectoryEntry virtualDirectory)
        {
            string iisserverName = IsapiFilterCommon.GetIISServerName(virtualDirectory);
            string iislocalPath  = IsapiFilterCommon.GetIISLocalPath(virtualDirectory);
            string text          = null;
            string text2         = null;
            string text3         = null;

            IisUtility.ParseApplicationRootPath(iislocalPath, ref text, ref text2, ref text3);
            if (OwaIsapiFilter.GetMarkedPathCount(iisserverName, text2) <= 1)
            {
                OwaIsapiFilter.RemoveFilter("IIS://" + iisserverName + text2);
            }
        }
Exemple #5
0
        internal static void CreateFilter(string adsiWebSitePath, string filterName, string filterDirectory, string extensionBinary, bool enable, out bool filterCreated)
        {
            filterCreated = false;
            string iisserverName = IsapiFilterCommon.GetIISServerName(adsiWebSitePath);

            using (RegistryKey registryKey = RegistryUtil.OpenRemoteBaseKey(RegistryHive.LocalMachine, iisserverName))
            {
                using (RegistryKey registryKey2 = registryKey.OpenSubKey("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Setup"))
                {
                    string text = Path.Combine((string)registryKey2.GetValue("MsiInstallPath"), filterDirectory);
                    text = Path.Combine(text, extensionBinary);
                    using (DirectoryEntry directoryEntry = IsapiFilter.CreateIsapiFilter(adsiWebSitePath, text, filterName, out filterCreated))
                    {
                        if (filterCreated)
                        {
                            directoryEntry.Properties["FilterFlags"].Value   = MetabasePropertyTypes.FilterFlags.NotifyOrderMedium;
                            directoryEntry.Properties["FilterEnabled"].Value = enable;
                            directoryEntry.CommitChanges();
                            IisUtility.CommitMetabaseChanges(iisserverName);
                        }
                    }
                }
            }
        }
Exemple #6
0
 internal static string GetIISServerName(DirectoryEntry virtualDirectory)
 {
     return(IsapiFilterCommon.GetIISServerName(virtualDirectory.Path));
 }
Exemple #7
0
        private static void AllowIsapiExtension(DirectoryEntry virtualDirectory, string groupId)
        {
            string iisserverName = IsapiFilterCommon.GetIISServerName(virtualDirectory);

            OwaIsapiFilter.AllowIsapiExtension(iisserverName, groupId);
        }