Esempio n. 1
0
        private static int GetMarkedPathCount(string server, string webSitePath)
        {
            int          num      = 0;
            IMSAdminBase iisAdmin = IMSAdminBaseHelper.Create(server);

            webSitePath = "/LM" + webSitePath;
            List <string> list = new List <string>();
            int           num2 = IMSAdminBaseHelper.GetDataPaths(iisAdmin, webSitePath, MBIdentifier.FormsAuthenticationEnabledProperty, MBDataType.Dword, ref list);

            if (num2 == -2147024893)
            {
                throw new OwaIsapiFilterException(Strings.FormsAuthenticationDeleteMarksIfUnusedPathNotFoundException(webSitePath), num2);
            }
            if (num2 < 0)
            {
                throw new OwaIsapiFilterException(Strings.FormsAuthenticationDeleteMarksIfUnusedUnknownErrorException(webSitePath, 45054), num2);
            }
            int[] array = new int[list.Count];
            for (int i = 0; i < list.Count; i++)
            {
                OwaIsapiFilter.FormsAuthPropertyFlags formsAuthPropertyFlags;
                num2 = OwaIsapiFilter.GetFlags(iisAdmin, list[i], out formsAuthPropertyFlags);
                if (num2 == -2147024891)
                {
                    throw new OwaIsapiFilterException(Strings.FormsAuthenticationDeleteMarksIfUnusedCheckMarkAccessDeniedException(list[i]), num2);
                }
                if (num2 != -2147024893 && num2 != -2146646015)
                {
                    if (num2 < 0)
                    {
                        throw new OwaIsapiFilterException(Strings.FormsAuthenticationDeleteMarksIfUnusedUnknownCheckErrorException(list[i]), num2);
                    }
                    num++;
                }
            }
            if (num == 1 && string.Compare(list[array[0]], webSitePath, true, CultureInfo.InvariantCulture) == 0)
            {
                num = 0;
            }
            return(num);
        }
        internal static int GetDataPaths(string searchPath, MBIdentifier propertyID, MBDataType dataType, ref List <string> paths)
        {
            IMSAdminBase iisAdmin = IMSAdminBaseHelper.Create();

            return(IMSAdminBaseHelper.GetDataPaths(iisAdmin, searchPath, propertyID, dataType, ref paths));
        }