Server Error in '/' Application.

5 posts, 0 answers
  1. Daf
    Daf avatar
    2 posts
    Member since:
    Aug 2009

    Posted 18 Aug 2009 Link to this post

    Just tried using this tool for the first time today and I'm getting this error...

    Server Error in '/' Application.

    I've tried it with simple code snippets e.g. Dim sExcelFileName As String = "myExcelFile.xls" and it still gives me the same error.


    Here is the Stack Trace
    [ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
       System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +173
       System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72
       System.Web.UI.WebControls.CheckBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +8739164
       System.Web.UI.WebControls.CheckBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +14
       System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743
    

    Daf


  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 18 Aug 2009 Link to this post

    Hi Daf,

    I just tried this line with our converter however everything worked fine for me - screenshot attached.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Daf
    Daf avatar
    2 posts
    Member since:
    Aug 2009

    Posted 18 Aug 2009 Link to this post

    Hi, thanks for the quick reply,  I've just tried it again and still get the same problem.

    I would attach screenshot... but don't seem to have the option on the text editor to do so.  I'm accessing your app from the following url
    http://www.codechanger.com/ .  If i try it on <http://converter.telerik.com> I get re-directed to <http://converter.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/Default.aspx>  which I take it is your default error page.

    Did you clear your cache before testing it?

    Daf
  4. Zachary Greve
    Zachary Greve avatar
    3 posts
    Member since:
    Oct 2009

    Posted 29 Nov 2011 Link to this post

    I got the same error when converting a lot of code from C# to VB.  Afterward, I clicked the back button, and the 'Convert Code' button was disabled, even when I pasted code into the 'From' text box.

    Here is the code (Yeah, I know it is rather lengthy):
    #region Windows API
     
    private const int WM_SETREDRAW = 0x0B;
    private const int EM_SETEVENTMASK = 0x0431;
    private const int EM_SETCHARFORMAT = 0x0444;
    private const int EM_GETCHARFORMAT = 0x043A;
    private const int EM_GETPARAFORMAT = 0x043D;
    private const int EM_SETPARAFORMAT = 0x0447;
    private const int EM_SETTYPOGRAPHYOPTIONS = 0x04CA;
    //private const int CFM_UNDERLINETYPE = 0x800000;
    //private const int CFM_BACKCOLOR = 0x4000000;
    private const int CFE_AUTOBACKCOLOR = 0x4000000;
    //private const int PFM_ALIGNMENT = 0x08;
    private const int TO_ADVANCEDTYPOGRAPHY = 0x01;
     
    [DllImport("user32", CharSet = CharSet.Auto)]
    private static extern int SendMessage(HandleRef hWnd, int msg, int wParam, int lParam);
     
    //Comment out later
    //[DllImport("user32", CharSet = CharSet.Auto)]
    //private static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref CHARFORMAT2 lParam);
     
    [DllImport("user32", CharSet = CharSet.Auto)]
    private static extern IntPtr SendMessage(HandleRef hWnd, int msg, Int32 wParam, ref IntPtr lParam);
     
    [DllImport("user32", CharSet = CharSet.Auto)]
    private static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref IRichEditOleCallback lParam);
     
    [DllImport("user32", CharSet = CharSet.Auto)]
    private static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref PARAFORMAT2 lParam);
     
    [DllImport("USER32", EntryPoint = "SendMessageA", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
    private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
     
    /// <summary>
    /// Contains information about character formatting in a rich edit control.
    /// </summary>
    /// <remarks><see cref="CHARFORMAT"/> works with all Rich Edit versions.</remarks>
    [StructLayout(LayoutKind.Sequential)]
    private struct CHARFORMAT
    {
        public int cbSize;
        public uint dwMask;
        public uint dwEffects;
        public int yHeight;
        public int yOffset;
        public int crTextColor;
        public byte bCharSet;
        public byte bPitchAndFamily;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
        public char[] szFaceName;
    }
     
    /// <summary>
    /// Contains information about character formatting in a rich edit control.
    /// </summary>
    /// <remarks><see cref="CHARFORMAT2"/> requires Rich Edit 2.0.</remarks>
    [StructLayout(LayoutKind.Sequential)]
    private struct CHARFORMAT2
    {
        public int cbSize;
        public uint dwMask;
        public uint dwEffects;
        public int yHeight;
        public int yOffset;
        public int crTextColor;
        public byte bCharSet;
        public byte bPitchAndFamily;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
        public char[] szFaceName;
        public short wWeight;
        public short sSpacing;
        public int crBackColor;
        public int LCID;
        public uint dwReserved;
        public short sStyle;
        public short wKerning;
        public byte bUnderlineType;
        public byte bAnimation;
        public byte bRevAuthor;
    }
     
    /// <summary>
    /// Contains information about paragraph formatting in a rich edit control.
    /// </summary>
    /// <remarks><see cref="PARAFORMAT"/> works with all Rich Edit versions.</remarks>
    [StructLayout(LayoutKind.Sequential)]
    private struct PARAFORMAT
    {
        public int cbSize;
        public uint dwMask;
        public short wNumbering;
        public short wReserved;
        public int dxStartIndent;
        public int dxRightIndent;
        public int dxOffset;
        public short wAlignment;
        public short cTabCount;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
        public int[] rgxTabs;
    }
     
    /// <summary>
    /// Contains information about paragraph formatting in a rich edit control.
    /// </summary>
    /// <remarks><see cref="PARAFORMAT2"/> requires Rich Edit 2.0.</remarks>
    [StructLayout(LayoutKind.Sequential)]
    private struct PARAFORMAT2
    {
        public int cbSize;
        public uint dwMask;
        public short wNumbering;
        public short wReserved;
        public int dxStartIndent;
        public int dxRightIndent;
        public int dxOffset;
        public short wAlignment;
        public short cTabCount;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
        public int[] rgxTabs;
        public int dySpaceBefore;
        public int dySpaceAfter;
        public int dyLineSpacing;
        public short sStyle;
        public byte bLineSpacingRule;
        public byte bOutlineLevel;
        public short wShadingWeight;
        public short wShadingStyle;
        public short wNumberingStart;
        public short wNumberingStyle;
        public short wNumberingTab;
        public short wBorderSpace;
        public short wBorderWidth;
        public short wBorders;
    }
     
    #endregion

    This comes from an open source project I am trying to refactor and update/enhance, but with the several thousand lines of code, it gets tiring converting it manually. Project link: Enhanced RichTextBox

    I am using Firefox 8.0 on Windows 7 Ultimate 64bit.
  5. Todd
    Admin
    Todd avatar
    66 posts

    Posted 04 Jan 2012 Link to this post

    Hi Zachary,

    Sorry for the trouble!

    I just tried your snippet in Firefox and Chrome, and I did not see any server errors with the converter. It seems you may have encountered a temporary issue with the converter that has since been resolved. Try your conversion again and you should have more success.

    Hope that helps.

    -Todd

Back to Top