private void ResolveDefaultProfileNode()
        {
            if ((securitySettings.DefaultProfileProviderName == null) || (securitySettings.DefaultProfileProviderName.Length == 0))
            {
                return;
            }

            ProfileProviderCollectionNode nodes = this.Hierarchy.FindNodeByType(this, typeof(ProfileProviderCollectionNode)) as ProfileProviderCollectionNode;

            Debug.Assert(nodes != null, "Could not find the ProfileProviderCollectionNode");
            DefaultProfileInstance = Hierarchy.FindNodeByName(nodes, securitySettings.DefaultProfileProviderName) as ProfileProviderNode;
        }
        private void GetProfileProviders()
        {
            ProfileProviderCollectionNode profileProviders = Hierarchy.FindNodeByType(typeof(ProfileProviderCollectionNode)) as ProfileProviderCollectionNode;

            if (profileProviders == null)
            {
                return;
            }
            if (Object.ReferenceEquals(securitySettings.ProfileProviders, profileProviders.ProfileProviderDataCollection))
            {
                return;
            }

            securitySettings.ProfileProviders.Clear();
            foreach (ProfileProviderData profileProviderData in profileProviders.ProfileProviderDataCollection)
            {
                securitySettings.ProfileProviders[profileProviderData.Name] = profileProviderData;
            }
        }