Try our conversational search powered by Generative AI!

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
New Series: Building a .NET Core headless site on Optimizely Graph and SaaS CMS

Welcome to this new multi-post series where you can follow along as I indulge in yet another crazy experiment: Can we make our beloved Alloy site r...

Allan Thraen | Jun 14, 2024 | Syndicated blog

Inspect In Index is finally back

EPiCode.InspectInIndex was released 9 years ago . The Search and Navigation addon is now finally upgraded to support Optimizely CMS 12....

Haakon Peder Haugsten | Jun 14, 2024

Change the IP HTTP Header used for geo-lookup in Application Insights


Johan Kronberg | Jun 10, 2024 | Syndicated blog

Copying property values

In this article I’d like to show simple Edit Mode extension for copying property values to other language versions. In one of my previous blogposts...

Grzegorz Wiecheć | Jun 8, 2024 | Syndicated blog