Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Taylor 873 posts 2086 karma points
    Feb 20, 2012 @ 13:33
    Matt Taylor
    0

    Error when attempting to edit a payment provider setting.

    If I click the little pencil to edit the value of the 'Continue URL' setting for the Account (Tea Commerce default) payment method it is causing the following error:

    Server Error in '/' Application.

    Operation is not valid due to the current state of the object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: Operation is not valid due to the current state of the object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InvalidOperationException: Operation is not valid due to the current state of the object.]
       System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +11371775
       System.Web.HttpRequest.FillInFormCollection() +329
    
    [HttpException (0x80004005): The URL-encoded form data is not valid.]
       System.Web.HttpRequest.FillInFormCollection() +11485890
       System.Web.HttpRequest.get_Form() +157
       System.Web.HttpRequest.get_HasForm() +11486692
       System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +141
       System.Web.UI.Page.DeterminePostBackMode() +100
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +259
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

    This is happening for all the payment methods.

    I updated the site to Tea Commerce 1.4.2.0 BETA 8 but the problem still occurs.

    Regards,

    Matt

  • Anders Burla 2560 posts 8256 karma points
    Feb 20, 2012 @ 13:37
    Anders Burla
    0

    Hi Matt

    What data is in your fields?

    The HttpException could point that some data isnt allowed or something like that. What if you make a new install of the starter kit - selects your payment method and insert the values you use in your current setup one by one and see when it fails. Would give us an idea of what is happening.

    Kind regards
    Anders

  • Matt Taylor 873 posts 2086 karma points
    Feb 21, 2012 @ 11:37
    Matt Taylor
    0

    Hi Anders,

    I don't think it is due to the content of the fields.

    I tried deleting all the payment methods, then I created a new one for Account.

    If I then click to edit the 'Continue URL' setting I get the error.

  • Anders Burla 2560 posts 8256 karma points
    Feb 21, 2012 @ 13:20
    Anders Burla
    0

    Hi Matt

    Can you replicate the error with a new install of Tea Commerce on an umbraco install?

    Kind regards
    Anders

  • Matt Taylor 873 posts 2086 karma points
    Feb 21, 2012 @ 15:47
    Matt Taylor
    0

    I'm not able to replicate the problem in another site.

    The site that has the problem has been through a number Tea Commerce upgrades so there is the possibility that something hasn't gone right along the way.

    The starter kit is very different now compared to when I first used it but what I have managed to do is this.

    Install the latest start kit.
    Change web.config of the starter kit to point to the database of the broken site.
    Log in to Umbraco to edit the 'Account' payment method settings.

    The error still occurs. This suggests to me that the problem is not with the site's files but with the data in the database.

     

  • Matt Taylor 873 posts 2086 karma points
    Feb 21, 2012 @ 15:54
    Matt Taylor
    0

    Anders, I've emailed you my datasbase.

    If you point a fresh starter kit install at it you'll be able to replicate the error (I hope).

    Regards,

    Matt

  • Anders Burla 2560 posts 8256 karma points
    Feb 21, 2012 @ 23:09
    Anders Burla
    1

    Hi Matt

    Found the solution! The error happens because of an update to the .NET framewrok from Microsoft. You need to add this key to your web.config and find a value that is big enough - I tested using 2000 and it worked with the DB you send me

    <appSettings>
     
    <addkey="aspnet:MaxHttpCollectionKeys"value="2000"/>
    </appSettings>

    http://stackoverflow.com/questions/8684049/asp-net-ms11-100-how-can-i-change-the-limit-on-the-maximum-number-of-posted-for

    Kind regards
    Anders

  • Matt Taylor 873 posts 2086 karma points
    Feb 22, 2012 @ 11:53
    Matt Taylor
    0

    Wow, what an obscure problem.
    You've done well to find that solution and it works for me too.

    Strange no-one else has reported it but I guess someone has to be the first.

    Thanks Anders,

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft