1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Exceptions

2 posts, 0 answered
  1. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    08 Sep 2008
    Link to this post
    hi (again) guys!

    sorry to be bombarding the forum with questions, but theres a few niggling problems that have been lurking for a while now, and it's got to a point where i'd like to get them all resolved before progressing in my project any further.

    The problem here is that i keep getting Server Errors whenever a page is added/edited.

    Server Error in '/' Application.


    An item with the same key has already been added.

    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.ArgumentException: An item with the same key has already been added.

    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:

     

    [ArgumentException: An item with the same key has already been added.]

       System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +48

       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +2668392

       Telerik.Cms.Web.UrlHelper.CachePage(ICmsPage page, ICmsUrlContext parentContext) +818

       Telerik.Cms.Web.UrlHelper.GetUrl(String url, Boolean skipSvcs) +1405

       Telerik.Cms.Web.CmsHttpModule.BeginRequest(Object sender, EventArgs e) +1222

       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92

       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


    the second exception/error that regularly raises it's ugly head is as follows:

    Server Error in '/' Application.


    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    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.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    Source Error:

     

    [No relevant source lines]


    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a7aede9f\da4d3e81\App_Web_h6tiejo1.6.cs    Line: 0

    Stack Trace:

     

    [HttpException (0x80004005): Unable to validate data.]

       System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +294

       System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +203

     

    [ViewStateException: Invalid viewstate.

             Client IP: 10.60.62.123

             Port: 1666

             User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.0.3705; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)

             ViewState: ES9kaa1KjH99s2C1vjiCDsvQD2RHgrEwJ/EpPlybnaLoHKx/wzSjHOuc907hrm2HKrdJqGntcBDPkts+Cy0eGs9iB8gDl7LdCRDoiCyw6g3E2Bo538cygoAj9mM37Y32JuZ0gJaIwGbeJXvW0ev8Czmdj3SpNB7EF8uXOb7vtx+p4luNy3u9ip/cx6NEvh2unh1DsM5xBeSQCXqzP0pfgrMo2WCwyjw9g3+B0uceWbzHDVhXxCmX697h8Zyt7bGtL6bcSyskPGOWdNUEQfn2e0PPRH7nzHp38xa/mZ1Rc+qjVwIc7qiYfoQMdE3KU1EFj/ofELpRibEs/JJseC9aCLnSy/TjO/vXkUvavkkN6Fcg6N5Z/X1ODn8LbKRHFlhLdoljSJZfvpT2NxdoTX8OXtqz29HNPciqukF6vWpcwLvne3tuojhod6AAJhAEjiF184yNJT6W+H7pNNofqt5uP9CWVp0FONe58tmtZO8HFEOjqZN+LMKn/aHzGgJFXdAG64TTRZnP2f1ES0L7fSOapop+g66P4wwXa830eP3nrNPNcXAnO0/a5yKWi47JlZBpAiwnI0NvOC4odOxfFJrBPNgO30i7yQBWSzAK9Jy4n1ShSLjhoZamuThCOmu6lIhKbCTl28mCEg/BeASfFTFH6N3NAq/yO63rdi3ZXv3HoApzJjizNdTdtLa/BX03OszhUNPXB7WsUWozbeaE0B3TrV0iHTS/9c5S33DHi3uoTbl8mEdC5zmBu8R3fJlOOJ7vjnr5+kOzyzv7fppRDos28mn6hzMDT+pmGte6/5m0/KEdOWz0tJq4...]

     

    [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]

       System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +267

       System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +282

       System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4

       System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37

       System.Web.UI.HiddenFieldPageStatePersister.Load() +198

       System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83

       System.Web.UI.Page.LoadAllState() +35

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350

       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213

       System.Web.UI.Page.ProcessRequest() +86

       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18

       System.Web.UI.Page.ProcessRequest(HttpContext context) +49

       ASP.sitefinity_admin_pages_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a7aede9f\da4d3e81\App_Web_h6tiejo1.6.cs:0

       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358

       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


    Any idea what may be causing these errors?

    Your help is always appreciated,
    thanks again,
    Nick
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    11 Sep 2008
    Link to this post
    Hello Nick,

    We had a similar error reported for SP2. Could you please confirm that you are running v3.2 SP2? This was fixed in the hotfix (v3.2.1616.x), but please let me first tell you what is causing the issue, so you could tell us if this is your case:

    The problem occurs when you have a normal page with an additional URL that points to a page which is one level beyond the group page. Example:

    normalpage 
      |_________TestPage
     

    TestPage has additional URL that points to ~/normalpage/TestPage/additional.aspx

    Could you check your website, and see if you have such pages? If this is the case, as a workaround, if you set your additional URLs to point to a page that has the same hierarchy level as TestPage, the problem will disappear.


    If you have a template which has the same name as some page, please rename the template or the page that throws the exception.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered