Sql guest users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I'm not too concerned about a single user making lots of requests.  However, PingAlive was making requests every two minutes (I'm up to 18000+ after several weeks).  This is what I did in  src\Libraries\Nop.Core\WebHelper.cs

        public virtual bool IsSearchEngine(HttpRequestBase request)
         ...                  
             result = "77.73.3.96,".Contains(request.UserHostAddress); //pingalive.com


It looks like Determining Whether a Browser Accepts Cookies vs. supports them may not be so easy.
12 years ago
Yes single users that use browsers that don't accept cookies must be rare, but knowing that nopcommerce will create one guest user per request when cookies are not used may be considered as an exploit?
9 years ago
Hello,

We have found that every minute our Nop Create several guests users.
At this moment, with our site in Testing (No Production yet), we have almost 4.000.000 of users in our DB and just only 2 or 3 persons get into Nop for testing purposes only few moments a day.

Can these guest users be created with services like Pingdom or the StayAlive option in Azure?

We have the Pingdom Service to review our Nop but every 5 minutes.

Literally guest users are created 9 or 10 per minute.

Any ideas how can we stop it or what service can produce it?
9 years ago
Sorry... I´ve read this post: https://www.nopcommerce.com/boards/t/14774/customer-id.aspx

And we know this is a normal situation.

We updated Pingdom to point to /keepalive/index so it dont creates users.

Thanks!
9 years ago
If you are using Azure Websites and you enable the Always On feature to stop the website being unloaded when in a period of low traffic you will also find that many guest users are created due to the face that the sites default URL is visited by a bot.

There are a couple of ways to prevent this.

1) Edit the uasXXXXX.ini file to include the bot.
2) The approach I took was to modify the source so that changes to uas.ini are not lost in future updates.

The UserAgent for the bot is called "AlwaysOn".  So I edited the routine which does the checks and specifically checked for it at the beginning.  It is not currently possible to change the Azure settings to point to a particular page as per the Pingdom suggestion.


        /// <summary>
        /// Get a value indicating whether the request is made by search engine (web crawler)
        /// </summary>
        /// <returns>Result</returns>
        public virtual bool IsSearchEngine()
        {
            if (_httpContext == null)
                return false;

            //we put required logic in try-catch block
            //more info: https://www.nopcommerce.com/boards/t/17711/unhandled-exception-request-is-not-available-in-this-context.aspx
            var result = false;
            try
            {
                var userAgent = _httpContext.Request.UserAgent;
                if (userAgent != null && userAgent.Equals("AlwaysOn", StringComparison.OrdinalIgnoreCase))
                    return true;

                var uasParser = GetUasParser();

                // we cannot load parser
                if (uasParser == null)
                    return false;

                result = uasParser.IsBot(userAgent);
            }
            catch (Exception exc)
            {
                Debug.WriteLine(exc);
            }
            return result;
        }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.