Flajaxian FileUploader with asp.net Master/Content pages

May 26, 2009 at 10:54 PM

I have a website the uses master/content pages.

I can successfully use the fileuploader on a seperate test page that is not connected to any master page.

However, I am unable to get the uplader to work on any of my content pages.

Has this issue been addressed already? Are there any examples of using this control with master/content pages?

Thank you in advance for any help!

May 27, 2009 at 5:43 PM

Ok, i found a solution......I just use an iFrame on the content page which references the upload page and all is good.

However, I am now running into a problem where large files are not getting uploaded. Files larger then 4100kb are not uploading.

Has anyone else had any issues with large files?

Everything else works great, excellent control.

Thank you in advance!

Coordinator
May 27, 2009 at 5:59 PM

Have you read this http://flajaxian.com/flajaxian.com/FileUploader2.0Help.html#RequestLimitations ?

May 27, 2009 at 7:53 PM

Sorry, I missed that.....works GREAT now!

Thank you.

May 28, 2009 at 7:41 PM

Is there a way to retrieve the path that the file was saved to in the FileStateChanged javascript function?

Reason I need to know this is because i am having a problem where my second upload attempt is failing but not throwing any errors.

I select a file and click upload and the file uploads correctly. Then i select another file and click upload again and it seems to upload, BUT the file is not really there on the server.

I am dyanamically setting the FileSaverAdapter FolderName based on the logged in user so I want to figure out if the is changeing/correct between uploads.

Long story short, I need to figure out why the second upload attempt (second upload 'click') is failing.

Thank you again.

Coordinator
Jun 1, 2009 at 5:19 PM

The path where the file was saved to happens on the server while FileStateChanged is on the client. Also the path depends on the implementation of the adapter, FileStateChanged is independent of what is happening on the server.

Jun 1, 2009 at 5:28 PM

i ran the server tracer on my upload attempts (http://flajaxian.com/ServerTracer.swf)

Below is the trace output from the second upload attempt.....does anyone know what "Error #2038" is? Is there an error list somewhere for cross-ref?

 

15)[2009-6-1 11:19:13.375]
onFileQueueEnds
14)[2009-6-1 11:19:13.359]
-------------------------
onUploadError
Object type is: [flash.events::IOErrorEvent]
Object content is:
{
    text: "Error #2038",
    type: "ioError",
    target: {
        modificationDate: Date.parse("Wed Jul 30 16:48:22 GMT-0500 2008"),
        creationDate: Date.parse("Wed Jul 30 16:48:24 GMT-0500 2008"),
        name: "DebugLog_080730.txt",
        size: 4888,
        creator: null,
        type: ".txt"
    },
    currentTarget: {
        /*!!!-Recursion - call to already traced object '[object FileReference]' !!!*/
    },
    bubbles: false,
    cancelable: false,
    eventPhase: 2
}
-------------------------

Coordinator
Jun 1, 2009 at 5:55 PM

Well it tells you, you got an input-output error on the server.

Use fiddler to find out what exactly is the error.

http://www.fiddler2.com/Fiddler2/version.asp

Jun 1, 2009 at 7:00 PM

Using fiddler, i get a server side error (500) on the second uplaod.

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.

I have searched discussions for enableEventValidation, but didnt find anything....so you know what may be the cause of this?

Again, my first upload is successfull but second is not.

Thank you for your responses and help!

Jun 1, 2009 at 9:09 PM

ok, i found a solution (not sure if its the best solution tho).

I added EnableEventValidation="false" to <%@ Page %> of the upload page and everything seems to work well.

However, im not sure if this is the best/only solution.....do you have any input on this matter?

Thank you!

Coordinator
Jun 2, 2009 at 6:05 AM

Yes that's the solution. MS are trying to be smart and throw exception any time they detect < or > characters in the request, but you rely only on that for your site security you are doomed

Mar 2, 2011 at 10:00 PM

please provide me with a code to connect this tool to database??? in vb.net