Shamrez Iqbal
Nov 26, 2009
(4 votes)



This is a gadget which hosts a Silverlight-application, with the purpose of uploading files to EPiServer.

Almost every day in the life of a developer the following happens- you’ve had a meeting/workshop with your client (of the suspicious kind), with offices in a shady back ally in a country nobody but a bunch of professors in geography have heard about,

So anyways, you have a need to store the documents from the meeting and other artifacts in a safe place (while you’re out partying), and what place is better than EPiServer?

Obviously you suspect the client’s wireless network to have sniffing mechanisms which will sniff out all your passwords on Google Docs and VPN probably won’t work. So you log in to Episerver, upload the files there. But there’s still the risk of password sniffers,sniffing out the cms password, but hey, we have to choose the lesser of two evils :-)

Anyways, initially I was thinking that an entry like this should be qualified for disqualification due to the fact that some part of it is made in Silverlight. But then contributions came and lo, they were all using some sort of external system.

Technical details and process

In the beginning just for prototyping, I tried SWFUpload, which didn’t work as intended with general mvc. I then turned to a Silverlight-based solution. But generally speaking the gadget is just a bunch of projects which others have made and glued together using HyperGLUE-technology (so advanced so complex, i won’t even tell you what it is!)  into a gadget (and inspired by other gadgets)

These include

1. Silverlight Multi File Uploader (using WCF)

2. Folder Browser Property (Marcus  Lindblom) - Meridium AB

As suggested in “Introduction to gadget development” the gadgets can be stored in the Modules but looking at other gadgets and seeing that the controller tries to look for the views in the root “Views” folder on the website. In order to make the folder browser work properly I had to use the same approach but I’m not too fond of it since can risk overwriting setting/files from other gadgets b: referring to javascript/aspx files in the gadget markup will be repeated many times over which might not be a good practice.

And initially I thought the gadget would be quite easy to create and even if the views are almost empty I tried a lot of things to make the different aspects of the gadget to work together.


Some features

· Select and upload multiple files

· Automatically overwrite (I think) the files if they already exist

· WCF- even bigger config files

· Ability to configure a standard folder always set (might be handy)

· Support for VersioningFileSystem and Nativefilesystem


sccren1 screen2  screen3




If you prefer to install it manually:

1. build and copy the folders to the root level of the site.

2. add the following things to web config


inside this node :

“<>  <modules autoDiscovery="Minimal">”



<add name="UploadGadget">
      <add assembly="MultiFileUploadGadget1" />

inside this node:



<service behaviorConfiguration="UploadServiceBehavior" name="mpost.FileUploadServiceLibrary.UploadService">
      <endpoint address="" binding="customBinding" bindingConfiguration="binaryBinding" contract="mpost.FileUploadServiceLibrary.IUploadService" >
          <dns value="localhost"/>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


inside this node:




<behavior name="UploadServiceBehavior" >
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>


inside this node:


<binding name="binaryBinding" ">
         <binaryMessageEncoding maxReadPoolSize="2147483647" maxSessionSize="2147483647" maxWritePoolSize="2147483647"  />
         <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />

Extra settings which might be required 

also, if you do not have  the handler for .svc files you might need to add something like (for IIS7.x) in <system.webserver><handlers>


<add name="svchandler" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />

small update: This should be added before other handlers have a chance to handle the extension.

and finally

serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

inside the <system.servicemodel> tag

I haven’t added this tag as part of the installation package since there isn’t any “key-attribute” to verify if the tag already exists so you need to add it manually in case it isn’t there.



You’ll have to google for the IIS6 settings.



During development of this and testing some VersioningFIleSystem methods I managed to wreck the filesystem. I recommend NativeFilesystem for testing. And as mentioned, existing files will most likely be overwritten.

Nov 26, 2009


Please login to comment.
Latest blogs
Prevent SQL error on CMS 12 minor version update

If using an early version of CMS 12, like 12.0, you will get an SQL error after upgrading to newer patch versions. The fix for this is minor locall...

Daniel Halse | Jun 8, 2023

Extended SelectionFactory

In one of my previous articles I described new Color Picker widget. Today I’d like to show another simple property. I prepared extended version of...

Grzegorz Wiecheć | Jun 7, 2023 | Syndicated blog

Unlock Creativity with Text Generation

Need fresh and innovative content ideas? The Epicweb.Optimizely.AIAssistant Addon has got you covered with its text generation feature. In this blo...

Luc Gosso (MVP) | Jun 6, 2023 | Syndicated blog

Breaking Language Barriers with Multilingual Text Translation

In today's globalized world, effective communication across languages is essential. The Epicweb.Optimizely.AIAssistant Addon makes language...

Luc Gosso (MVP) | Jun 6, 2023 | Syndicated blog