Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AsyncFileUpload: serverside a filename but no bytes

$
0
0

On a page we have layered several usercontrols and on one of the usercontrols i have now placed five AsynchFileUploads.

On my development machine, this functions perfect. But as soon as upload it to the testserver, it goes wrong.

The AsyncFileUpload-control-property HasFile is set to true and i do get a filename back. But i do NOT get any filebytes???

Snippet:

if( upload == null ) { LogInformational( "AsyncFileUpload: Upload is null", upload ); return null; }

if( !upload.HasFile )  { LogInformational( "AsyncFileUpload: Upload has no file", upload ); return null; }

int fileLength = -1;

if( upload.FileBytes != null ) fileLength = upload.FileBytes.Length;

if( !string.IsNullOrEmpty( upload.FileName) && (fileLength <= 0) )

{

    LogInformational( string.Format( "AsyncFileUpload: Filename set, but no bytes (Length: {0})", fileLength ), upload );

    throw new Exception( "Filename set, but no bytes" );

}

How is this possible?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>