Early this year I wrote a post about creating a File Uploader using Silverlight and WCF. And today I got a question from one forum, about to create uploader for multiple files. And here is source code, I am just modified my eariler source code slightly to select multiple file.
OpenFileDialog openFileDialog = new OpenFileDialog();
//Hard coding filter - You can read it from client side too.
openFileDialog.Filter = "Image Files|*.jpg;*.bmp;*.png";
openFileDialog.Multiselect = true;
bool? result = openFileDialog.ShowDialog();
if (result.HasValue && result.Value)
spProgress.Visibility = System.Windows.Visibility.Visible;
Service1Client client = new Service1Client();
client.DoUploadCompleted += (o, p) =>
if (p.Error != null)
And here is the helper methods.
private Dictionary<string, byte> CreateUploadData(IEnumerable<FileInfo> infos)
var files = new Dictionary<string, byte>();
foreach (var fileInfo in infos)
private byte ReadFileContents(Stream stream)
using (Stream sr = stream)
byte contents = new byte[sr.Length];
sr.Read(contents, 0, contents.Length);
Today I started installing SQL Server Management Studio express on my Windows 7 x64, and I started installing it, after few seconds, I got an error message like this
This installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 29506
Error Code 29506, While installing SQL Management Studio Express on Windows 7 x64
My initial thought was may be it is because of some problem with my downloaded installer. I downloaded it again and still the problem exists. Then I tried it with commandline(cmd), with Run As Administrator option and its worked
11:40 – 12:30 Sharepoint 2010 Programing – Abraham Peter
12.30 – 01:00 Ask the experts
Abraham Peter is a Senior Software Developer with 6 years of experience. He has been working with Microsoft .NET technologies and recently with SharePoint 2010. His experience spans developing fault tolerant systems, implementing secure coding practices, Watch Dog monitors for networks and also on the web application front.
Praseed Pai is a well known software architect from Kochi,Kerala. His areas of interest include Enterprise software development (using C#/.net) ,Engineering Software development (CAD/CAM/C++), Cross Platform C++ development (Windows/Linux/Mac), Computer Graphics, Computational Finance and Domain specific programming languages.
Mahima Radhakrishnan working as a Software Engineer with Orion India Systems Pvt Ltd. She started her carrier as a QA engineer, and currently working in Silverlight 4.0 technology. .She is Microsoft certified specialist in SQL development.