Try our conversational search powered by Generative AI!

Visitor group Criterion


Hi, I have setup a custom criterion that checks for cookie existance as per this post

I have all this setup fine, the trouble im running into is that the criterion is appearing twice:


I have searched my code in case there was another instance of the class by mistake, which there isnt, also renamed the one I had to double check this.  I then reverted my db to an ealier backup in case it was a previous version, on load I would still have two instances.  All I can think of is something is loading this object twice in the initialisation?

Jan 29, 2015 12:32

In case its needed:


            Category = "Technical",
            Description = "Determines if the current request contains the specified cookie (lookup by name)",
            DisplayName = "Cookie exists123")]
    public class CookieExistsCriterion : CriterionBase<CookieExistsViewModel>
        public override bool IsMatch(IPrincipal principal, HttpContextBase httpContext)
            if (httpContext.Request == null)
                return false;

            return httpContext.Request.Cookies[this.Model.CookieName] != null;


public class CookieExistsViewModel : CriterionModelBase
        public string CookieName { get; set; }

        public override ICriterionModel Copy()
            return ShallowCopy();
Edited, Jan 29, 2015 12:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.