Welcome to Mediachase Community Sign in | Join | Help    
in Search   

Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

Last post Fri, Sep 25 2009, 9:26 AM by truthbrother. 45 replies.
Page 3 of 4 (46 items)   < Previous 1 2 3 4 Next >
Sort Posts: Previous Next
  •  Wed, Jan 16 2008, 1:36 PM 7522 in reply to 7519

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Open the ClientLib project and look in ClientCustomer.Authenticate.  To get the status you can do the following:

    if (response.User[0].Status != AccountStatus.Authenticated)
    {
       // The user has not been Authenticated or marked as Authenticated
        ...
    }

    Here you can also check that an HMAC was assigned:
    response.User[0].Session.HMAC

    Hope this helps,


    Gary L Cox Jr
  •  Thu, Jan 17 2008, 1:41 PM 7533 in reply to 7522

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Says user is authenticated and I still recieved the invalid HMAC error.
  •  Fri, Jan 18 2008, 10:07 AM 7544 in reply to 7533

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Can I sent you the WebUtility and ClientLib projects in a .ZIP so you can check if they are correct.  I am using 4.1.1.
  •  Mon, Jan 21 2008, 8:43 AM 7556 in reply to 7544

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Anyone more suggestions?
  •  Tue, Jan 22 2008, 9:00 AM 7564 in reply to 7544

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Sure you can email them to us and I will run a compare.

    Thanks,

    Gary L Cox Jr
  •  Wed, Jan 23 2008, 2:44 PM 7571 in reply to 7564

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Please do not post source code in the forums. These forums are public. Use email instead.

    Thanks.

  •  Wed, Jan 23 2008, 3:23 PM 7572 in reply to 7571

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Your ClientLib matches with only 2 files changed but nothing that would cause a problem and the WebUtility has many changes but again nothing that should cause a problem.  Can you email me your AccountLoginModule files?  Please email them as this is a public forum.  Your last project files you posted had connection string information that you would not want publicly accessed.  We have removed those posts for your privacy.

    Gary L Cox Jr
  •  Mon, Jan 28 2008, 8:31 AM 7587 in reply to 7572

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Is this what you need.

        public string CustomerLogin
        {
            get
            {
                string customer = Request.QueryString["customer"];
                if (!String.IsNullOrEmpty(customer))
                    return customer;
                else
                    return null;
            }
        }
        protected void OnLoggingIn(object sender, LoginCancelEventArgs e)
        {
            if (!String.IsNullOrEmpty(CustomerLogin))
                ClientContext.Context["LoginOnBehafOfCustomer"] = CustomerLogin;
            else if (ClientContext.Context["LoginOnBehafOfCustomer"] != null)
                ClientContext.Context["LoginOnBehafOfCustomer"] = null;
        }
        protected void OnLoggedIn(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(CustomerLogin))
                CommonHelper.CreateAuthenticationCookie(CustomerLogin, Login1.RememberMeSet);
            else
                CommonHelper.CreateAuthenticationCookie(Login1.UserName, Login1.RememberMeSet);

            if (!ClientCustomer.AssociateLatestOrder())
                DisplayErrorMessage("Could not associate customer with the order");

            this.Page.Response.Redirect("~/Checkout", true);
        }
  •  Tue, Jan 29 2008, 11:18 AM 7604 in reply to 7587

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    You should use the Login1.DestinationPageUrl property instead of calling Redirect.  Also I noticed your using Login1, in the deployed Ecf 4.1.1 we use LoginForm.  Is your login screen custom?

    Gary L Cox Jr
  •  Tue, Jan 29 2008, 11:34 AM 7609 in reply to 7604

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    K I will do that. This is a custom login.  Lets figure out just the login on the login page now instead of this cart page first before we start back on this one.  Here is the code I have on the login page that isnt working because the entire site is not getting initalized.

    protected void OnLoggingIn(object sender, LoginCancelEventArgs e)
        {
            if (!String.IsNullOrEmpty(CustomerLogin))
                ClientContext.Context["LoginOnBehafOfCustomer"] = CustomerLogin;
            else if (ClientContext.Context["LoginOnBehafOfCustomer"] != null)
                ClientContext.Context["LoginOnBehafOfCustomer"] = null;
        }

        protected void OnLoggedIn(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(CustomerLogin))
                CommonHelper.CreateAuthenticationCookie(CustomerLogin, Login1.RememberMeSet);
            else
                CommonHelper.CreateAuthenticationCookie(Login1.UserName, Login1.RememberMeSet);

            if (!ClientCustomer.AssociateLatestOrder())
                DisplayErrorMessage("Could not associate customer with the order");

            string url = string.Empty;
            // Redirect
            if (Session["ReturnUrl"] != null)
            {
                url = String.Format("~{0}", Session["ReturnUrl"]);
                Session.Remove("ReturnUrl");
            }
            else
            {
                url = "~/Account-Info";
            }

            Login1.DestinationPageUrl = url;
            Response.Redirect(url,true);

        }
  •  Tue, Jan 29 2008, 11:53 AM 7611 in reply to 7609

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Seems Removing the Response.Redirect from any OnLoggedIn event has solved this problem and just used the DesintationPageUrl.  For now this case is closed, thanks for you wonderful help.
  •  Tue, Jan 29 2008, 1:13 PM 7615 in reply to 7611

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Thanks cblaze22, the issue was that you were redirecting and terminating the current page from being processed when you did Redirect("checkout", true).  The true was telling Response to stop processing the page which was probably ending the authentication.

    Thanks

    Gary L Cox Jr
  •  Fri, Jul 31 2009, 11:11 AM 11098 in reply to 7371

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Gary,

    We had a very similar situation where we were getting the following error thrown in our logs.

    {machinename}:: ERROR :: WSExceptionType: InvalidHMAC Message: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request.

    Logger: Mediachase.eCF.BusFacade.WebServiceException

    Thread: 7052

    Date: 2009-07-31 11:46:53,747

    NDC: (null)


    We followed your suggestion of clearing out cookies and that worked. Why would clearing our cookies work? What causes the cookie to go corrupt or bad?

    We are just looking for a better explanation then just clear the cookies.

    Thanks
  •  Mon, Aug 03 2009, 10:02 AM 11100 in reply to 11098

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    Hello Mark,

    Cookies store session info related to adding items to a cart, authenticating, registering a new account. These might need to get cleared for a number of reasons.  It could be code that is not initializing a session properly or it could be a random hiccup on the server.  Without studying the logs, we have no way of knowing for sure. 

    Here are some helpful links:

    http://msdn.microsoft.com/en-us/library/aa289495(VS.71).aspx

    http://msdn.microsoft.com/en-us/magazine/cc163708.aspx

    Let us know if this keeps happening.

    Mediachase Software

  •  Thu, Sep 24 2009, 8:00 PM 11188 in reply to 7405

    Re: Your request contains an invalid value for HMAC. Please check your HMAC and retry your request

    The forum is very alert in spam issues.

    ------------------------------------------------
    criminal background checks
    Criminal Background Checks Video
Page 3 of 4 (46 items)   < Previous 1 2 3 4 Next >
View as RSS news feed in XML
Site Terms | Privacy Policy | About Us | Contact Us
Running on Mediachase eCommerce Framework 4.0.
  Copyright © Mediachase, LTD. 1997-2006. All Rights Reserved

E-commerce, HelpDesk, Service Desk & Project Management Software, alternatives to Microsoft Project Server & Sharepoint Collaboration Server
project management software | microsoft project server | sharepoint collaboration server | issues management, helpdesk & service desk
Powered by Community Server, by Telligent Systems