How to upload files in Silverlight?

I am creating an application that is completely Silverlight. It is hosted on Windows Azure. How can I upload a file?

There are several downloadable SL files, such as one that do not work for me, because they are self-contained SLs - they cannot be embedded in my application.

I see some downloaded SL file examples that seem simple enough, but do I need to do something different for Azure than a regular ASP application?

Thanks.

+4
source share
2 answers

In addition to the WCF settings, you may need to do (documented here ), you need to think about where you will store the file on the server. You cannot just write to a local drive. Well, you can, but local storage is not guaranteed. Instead, you might want to consider saving your load in the Azure block, which is considered Durable Storage (it is supported in several places).

If you download an Azure frame directly from your Silverlight client, you need to connect to the Azure API. You must be careful to embed your key in your Silverlight application, and the recommended guide is to use shared signatures - see Steve Marx's post for more information on this.

You can also continue to use the WCF service and then use this service method to save your download to the blob. This gives you the ability to keep Silverlight application load logic intact, and also rely on a service level to track access to the downloaded file.

+1
source

You can use REST to load directly into Azure. See My example doing exactly what parallelism, reties and cancelations are allowed at: Silverlight-based Parallel Download Control

0
source

All Articles