public HttpResponseMessage ResetCount([FromBody] ResetCountRequest request)
        {
            if (ModelState.IsValid)
            {
                #region user authentication

                IEnumerable <string> headerValues;
                string keyFromClient = "";
                if (Request.Headers.TryGetValues("key", out headerValues))
                {
                    keyFromClient = headerValues.First();
                }

                if (NeeoUtility.AuthenticateUserRequest(request.uID, keyFromClient))
                {
                    #endregion

                    ulong temp = 0;
                    if (!NeeoUtility.IsNullOrEmpty(request.uID) && ulong.TryParse(request.uID, out temp))
                    {
                        request.uID = request.uID.Trim();
                        try
                        {
                            if (NeeoUser.ResetOfflineMessageCount(request.uID))
                            {
                                return(Request.CreateResponse(HttpStatusCode.OK));
                            }
                            else
                            {
                                return
                                    (Request.CreateResponse(
                                         (HttpStatusCode)Convert.ToInt32(CustomHttpStatusCode.UnknownError.ToString("D"))));
                            }
                        }
                        catch (ApplicationException appExp)
                        {
                            LogManager.CurrentInstance.ErrorLogger.LogError(
                                System.Reflection.MethodBase.GetCurrentMethod().DeclaringType,
                                "user id = " + request.uID + ", error:" + appExp.Message,
                                System.Reflection.MethodBase.GetCurrentMethod().Name);
                            return(Request.CreateErrorResponse((HttpStatusCode)Convert.ToInt32(appExp.Message), ""));
                        }
                        catch (Exception exp)
                        {
                            LogManager.CurrentInstance.ErrorLogger.LogError(
                                System.Reflection.MethodBase.GetCurrentMethod().DeclaringType,
                                "user id = " + request.uID + ", error:" + exp.Message, exp,
                                System.Reflection.MethodBase.GetCurrentMethod().Name);
                            return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ""));
                        }
                    }
                    else
                    {
                        LogManager.CurrentInstance.ErrorLogger.LogError(
                            System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "user id = " + request.uID
                            , System.Reflection.MethodBase.GetCurrentMethod().Name);
                        return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ""));
                    }
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.Unauthorized, ""));
                }
            }
            else
            {
                LogManager.CurrentInstance.ErrorLogger.LogError(
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "user id = " + request.uID
                    , System.Reflection.MethodBase.GetCurrentMethod().Name);
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ""));
            }
        }