This is a mirror of official site: http://jasper-net.blogspot.com/

Upload Large File of More Than 5 MB From Silverlight to Server Location Using WCF

| Thursday, July 21, 2011
This article is based on the article File Upload from Silverlight using WCF. So please read it before proceeding with this article.

A while back I wrote an article on uploading a File from Silverlight to a server location using WCF. I found my own article quiet useful. However, when I reread and implemented the code, I mentioned in the article, I found a few discrepancies:

    Code was unable to upload file with sizes in MB
    There was a bug in binding configuration.


In this article, I am going to rectify the above two bugs.

First modify basicHttpBinding as below:

SerLocWCF1.gif

Configure Endpoint as below:

SerLocWCF2.gif

So far everything is fine and if you run the code, you will be able to upload a file of a maximum size of 3MB. I tested it and I was able to upload a document file of 2.75 MB in size.

Now the question becomes, what if we want to upload a file of about 10 MB in size?

For that we need to reconfigure the things in the configuration file:

  1.     Configure service behavior maximum number of items to serialize or deserialize.
  2.     Configure HTTP Request length limit.

Read more: C# Corner
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/8379/

Posted via email from Jasper-net

0 comments: