[CLOSED] Multiupload error code

  1. #1

    [CLOSED] Multiupload error code

    Hi, we put all settings in global.asax as advised in your example (simple multiupload), but get the following error :

    Exception Message
     
    Invalid viewstate. 
        Client IP: fe80::d59f:67f:b3b6:d019%10
        Port: 5167
        Referer: 
        Path: /uploadflash.aspx
        User-Agent: Shockwave Flash
        ViewState: %2FwEPDwUJMjE2NDEyODExZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgUQUmVzb3VyY2VNYW5hZ2VyMQUMTXVsdGlVcGxvYWQxu7u7oQhX0k%2F14UWHBctPBAFHfCeydFV6YUfTOfv6hAA%3D
    Inner Exception message
    The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

    <%@ Page Language="C#" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    
    <!DOCTYPE html>
    <script runat="server">
    
        protected void Page_Load(object sender, EventArgs e)
        {
            //MultiUpload1.UploadUrl = "/Uploads";
    
            //MultiUpload1.UploadUrl = Request.Url +
            //        "?ASPSESSID=" + Session.SessionID +
            //        "&AUTHID=" + (Request.Cookies[FormsAuthentication.FormsCookieName] == null ? "" : Request.Cookies[FormsAuthentication.FormsCookieName].Value);
    
            MultiUpload1.PostParams.Add(new Ext.Net.Parameter("ASPSESSID", Session.SessionID));
            MultiUpload1.PostParams.Add(new Ext.Net.Parameter("AUTHID", Request.Cookies[FormsAuthentication.FormsCookieName] == null ? "" : Request.Cookies[FormsAuthentication.FormsCookieName].Value));
            
        
        }
        protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
        {
            System.Threading.Thread.Sleep(3000); // for testing purposing only
            X.Msg.Notify("File is uploaded", "Name: " + e.FileName).Show();
           }
        
    </script>
    
    
    <html>
    <head id="Head1" runat="server">
        <title>Simple MultiUpload - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
        <script type="text/javascript">
    
            function uploadError(item, file, errorCode, message) {
                alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
            }
    
            function fileSelectionError(item, file, errorCode, message) {
                alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
            }
        </script>
    </head>
    <body>
         <form id="Form1" runat="server">
             <ext:ResourceManager ID="ResourceManager1" runat="server" />        
    
             <h1>Simple MultiUpload</h1>
            
             <ext:MultiUpload ID="MultiUpload1" runat="server"
                OnFileUpload="MultiUpload1_FileUpload"
                AutoStartUpload="true"
                FileDropAnywhere="true"
                FileSizeLimit="15 MB"
                FileTypes="*.*"
                FileTypesDescription="All Files"
                FileUploadLimit="100"
                
                FileQueueLimit="0">
                <Listeners>
                    <UploadStart Handler="Ext.Msg.wait('Uploading...');" />
                    <UploadError Fn="uploadError" />
                    <FileSelectionError Fn="fileSelectionError" />
                    <UploadComplete Handler="Ext.Msg.hide();" />
                </Listeners>
            </ext:MultiUpload>
         </form>     
    </body>
    </html>
    
    When it reached the global.asax there are no "ASP.NET_SESSIONID" and "FormsAuthentication.FormsCookieName" cookies and they are already created when login the the application.
    Could you provide a full sample including the global.asax
    Last edited by Daniil; Nov 23, 2013 at 10:49 PM. Reason: [CLOSED]
  2. #2
    Hi @Digital.Dynamics,

    Please post a stack trace of the Exception.
  3. #3
    Here is the full error message :
    Message from /Paradigm4/uploadflash.aspx?ASPSESSID=frmdppkxwgrorlcdldq1onnq&AUTHID=E2C7B2DA1C60DB6E7855FB3E3F5B8526CDD4B2C76FE18940BCFD5EE6FDB887089D75B10F0ABE872251B41DDFA4B36D6F9722B4883AA4810B7AD66532EEB8BD639CD783CA38EC9D9CB5784A99C9C4E65FCCDF2B51F3828A862C3EA2A5FE56DC15BCABEFA632DEA0C1F87E6DFBA1AC25D39A7A759684C85689C8F96311B8C338C889E0981121497D9901742119BF6A5AC9 code file fe80::d59f:67f:b3b6:d019%10
    The state information is invalid for this page and might be corrupted.
    
    Source
    System.Web
    
    Target site
    Void ThrowError(System.Exception, System.String, System.String, Boolean)
    
    Stack trace
       at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
       at System.Web.UI.HiddenFieldPageStatePersister.Load()
       at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
       at System.Web.UI.Page.LoadAllState()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.uploadflash_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\paradigm4\042096e5\bdbd47e6\App_Web_uploadflash.aspx.cdcab7d2.tqjs4rmm.0.cs:line 0
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
    ToString()
    
    System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate. 
    	Client IP: fe80::d59f:67f:b3b6:d019%10
    	Port: 9332
    	Referer: 
    	Path: /Paradigm4/uploadflash.aspx
    	User-Agent: Shockwave Flash
    	ViewState: %2FwEPDwUJMjE2NDEyODExD2QWAgIED2QWAgIDDw8WAh4JVXBsb2FkVXJsBfMCaHR0cDovL2Rldi10bC9QYXJhZGlnbTQvdXBsb2FkZmxhc2guYXNweD9BU1BTRVNTSUQ9ZnJtZHBwa3h3Z3JvcmxjZGxkcTFvbm5xJkFVVEhJRD1FMkM3QjJEQTFDNjBEQjZFNzg1NUZCM0UzRjVCODUyNkNERDRCMkM3NkZFMTg5NDBCQ0ZENUVFNkZEQjg4NzA4OUQ3NUIxMEYwQUJFODcyMjUxQjQxRERGQTRCMzZENkY5NzIyQjQ4ODNBQTQ4MTBCN0FENjY1MzJFRUI4QkQ2MzlDRDc4M0NBMzhFQzlEOUNCNTc4NEE5OUM5QzRFNjVGQ0NERjJCNTFGMzgyOEE4NjJDM0VBMkE1RkU1NkRDMTVCQ0FCRUZBNjMyREVBMEMxRjg3RTZERkJBMUFDMjVEMzlBN0E3NTk2ODRDODU2ODlDOEY5NjMxMUI4QzMzOEM4ODlFMDk4MTEyMTQ5N0Q5OTAxNzQyMTE5QkY2QTVBQzlkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgUQUmVzb3VyY2VNYW5hZ2VyMQUMTXVsdGlVcGxvYWQxlEn64OckBeJeJhTenZtnQfqJMC3FyaD45hiwK475dp4%3D ---> System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. 
       at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
       at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
       at System.Convert.FromBase64String(String s)
       at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
       at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose)
       at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
       at System.Web.UI.HiddenFieldPageStatePersister.Load()
       --- End of inner exception stack trace ---
       at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
       at System.Web.UI.HiddenFieldPageStatePersister.Load()
       at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
       at System.Web.UI.Page.LoadAllState()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.uploadflash_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\paradigm4\042096e5\bdbd47e6\App_Web_uploadflash.aspx.cdcab7d2.tqjs4rmm.0.cs:line 0
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  4. #4
    Thank you.

    Please try the following.

    1. Set up FormID="Form1" for the MultiUpload. It requires updating for the SVN trunk.

    2. Set up DisableViewState="false" for the ResourceManager.

    Does it help remedy the issue?
    Last edited by Daniil; Nov 21, 2013 at 3:45 PM.
  5. #5
    Thanks for your support, It's working fine now.

Similar Threads

  1. [CLOSED] MultiUpload in IE10 -movieElement undefined
    By ViDom in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 08, 2013, 11:49 AM
  2. [FIXED] [2.4] MultiUpload selection limit error
    By xtremexploit in forum Bugs
    Replies: 13
    Last Post: Nov 04, 2013, 5:01 AM
  3. MultiUpload how to access to PostParams
    By xtremexploit in forum 2.x Help
    Replies: 2
    Last Post: Oct 31, 2013, 9:09 PM
  4. Simple MultiUpload not working on IE9 (Windows 7)
    By xtremexploit in forum 2.x Help
    Replies: 1
    Last Post: Oct 28, 2013, 9:02 AM
  5. Replies: 5
    Last Post: Oct 07, 2013, 2:44 PM

Posting Permissions