Viewstate validation error for FileBrowserPage

Last post 04-15-2014, 6:58 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  04-15-2014, 1:59 AM 80253

    Viewstate validation error for FileBrowserPage

    I'm trying to get a subclass of the CuteEditor.Dialogs.FileBrowserPage to work in our UAT environment. I am getting a viewstate validate error message:

     [ViewStateException: Invalid viewstate. Client IP: ::1 Port: 58977 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 ViewState: /wEWAgUFZW4tYXUFAyRhMQ5U1lswcR/GpLqPpltjDu3HiphP Referer: http://localhost:4922/ClientProfile.aspx?pid=c2f4f83a-6594-4c35-beaa-4d2812bff20d Path: /UserControls/LMSUploadDocument.aspx] [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) +106 System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +237 System.Web.UI.LosFormatter.Deserialize(String input) +11 CuteEditor.CEU.SplitEditorSetting(String setting, String& culture, String& securityPolicyFile, NameValueCollection& dict) +140 CuteEditor.CEU.SplitEditorSetting(HttpContext context, String& culture, String& securityPolicyFile, NameValueCollection& dict) +159 CuteEditor.Impl.FileStorage.CreateInstance(HttpContext context) +132 CuteEditor.Dialogs.FileBrowserPage.OnInit(EventArgs e)

     

    (That's from my development machine, but the same error occurs on our UAT machine). It works fine in production. I believe that the problem is that you have to specify a "setting" parameter on the QueryString. We are doing that, but I believe we're setting an incorrect string here for UAT (for reference, it is "!3wEWAgUFZW4tYXUFAyRhMQtS!1kquEtliaQVybChbD6uJOyE3").

     

    I understand this is related to the IP of the machine. Is there a tool that can tell me what the correct string should be? (I cannot find the version number of CuteEditor; apparently you're supposed to be able to find it by viewing source on a page with an editor, but all I get is 

      <!-- CuteEditor ceEditor Begin -->  with no version number).

  •  04-15-2014, 6:58 AM 80254 in reply to 80253

    Re: Viewstate validation error for FileBrowserPage

    Hi,

     

    Try set property UseStandardDialog  to true, then open the same dialog what you are testing, you will get the full parameter from the url field.

     

      <CE:Editor ID="editor1" runat="server" UseStandardDialog="true">

            </CE:Editor> 

     

    Regards,

     

    Ken 

View as RSS news feed in XML