This project has moved and is read-only. For the latest updates, please go here.

Help for integrating in existing web app

Nov 4, 2008 at 1:29 PM
Edited Nov 4, 2008 at 1:35 PM
Hi! First of all, Great control!
I've problems integrating it in my existing web app. The control seems running, but when I click the upload button it shows "Upload failed" label.
Also I don't know how to debug this.... I'm a newbe with Silverlight and with WCF.
Please, may you give me some advices?


Nov 4, 2008 at 1:51 PM

Make sure to access your test page using the visual studio build in webserver. Set your breakpoints and just hit F5 to debug inside Silverlight.
Nov 4, 2008 at 2:05 PM
Sorry to bother you, but I'm trying to debug within my web app that run under IIS7.
I added your projects (mpost.FileUploadServiceLibrary & mpost.SilverlightMultiFileUpload) to my solution, in my webapplication project I added the reference to mpost.FileUploadServiceLibrary; in the web root I added the ClientBin folder with the .xap, e also in the webroot I added the .svc file.

In the web.config I added the following:
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
            <binding name="BasicHttpBinding_IUploadService" maxBufferSize="65536"
               <security mode="None" />
         <endpoint address="http://localhost:41/SilverlightUploadService.svc"
             binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUploadService"
             name="BasicHttpBinding_IUploadService" />

            <behavior name="UploadServiceBehavior">
               <serviceMetadata httpGetEnabled="true"/>
               <serviceDebug includeExceptionDetailInFaults="true"/>
         <service behaviorConfiguration="UploadServiceBehavior" name="mpost.FileUploadServiceLibrary.UploadService">
            <endpoint address="" binding="basicHttpBinding" contract="mpost.FileUploadServiceLibrary.IUploadService">
                  <dns value="localhost"/>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

Maybe I'm missing something? It seems that the control can't call the wcf service...but I haven't visibility of the error....
Nov 4, 2008 at 2:15 PM

If you're running under IIS, you need to give IIS / ASP.Net write access to the upload folder. The upload folder also needs to be created in advance.

Good luck,
Nov 5, 2008 at 8:49 AM
Hi Michiel,
the upload folder was already writable.

I managed to debug the apps, the problem is when the control try to call the StoreFileAdvanced method of IUploadService, it seems that it can't communicate with the wcf service.
Instead of the path "http://localhost:53409/mpost.SilverlightMultiFileUploadWeb/SilverlightUploadService.svc" I replaced it with "http://localhost:41/SilverlightUploadService.svc", 'cause "localhost:41" is the local url of my web app.

How I can correctly configure the service?