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:
Configure Endpoint as below:
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:
QR:
There was a bug in binding configuration.
In this article, I am going to rectify the above two bugs.First modify basicHttpBinding as below:
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:
- Configure service behavior maximum number of items to serialize or deserialize.
- Configure HTTP Request length limit.
QR: