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

Another 'Upload failed' problem

Jan 5, 2009 at 6:45 PM
Michiel,

Thanks again for this Silverlight component.

I read through your discussion 'Getting Message "Upload Failed" Every time' and followed it the best I could.

When I try to open SilverlightUploadService.svc in the visual studio web server, I get the following error:

The type 'mpost.FileUploadServiceLibrary.UploadService', provided as the Service attribute value in the ServiceHost directive could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The type 'mpost.FileUploadServiceLibrary.UploadService', provided as the Service attribute value in the ServiceHost directive could not be found.

However, the WCF Service Host is running and appears to have that service registered with a Status of Started.

http://localhost:8731/Design_Time_Addresses/mpost.FileUploadServiceLibrary/UploadService/mex

When I attempt to upload, I get a an exception in:

 mpost.SilverlightMultiFileUpload.UploadService.UploadServiceClient.UploadServiceClientChannel
        
        public void EndStoreFileAdvanced(System.IAsyncResult result) {
                object[] _args = new object[0];
                base.EndInvoke("StoreFileAdvanced", _args, result);      //<< error occured here, _args.Length is 0
            }


System.ServiceModel.CommunicationException was unhandled by user code
  Message="The remote server returned an error: NotFound"
  StackTrace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
       at mpost.SilverlightMultiFileUpload.UploadService.UploadServiceClient.UploadServiceClientChannel.EndStoreFileAdvanced(IAsyncResult result)
       at mpost.SilverlightMultiFileUpload.UploadService.UploadServiceClient.mpost.SilverlightMultiFileUpload.UploadService.IUploadService.EndStoreFileAdvanced(IAsyncResult result)
       at mpost.SilverlightMultiFileUpload.UploadService.UploadServiceClient.OnEndStoreFileAdvanced(IAsyncResult result)
       at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  InnerException: System.Net.WebException
       Message="The remote server returned an error: NotFound"
       StackTrace:
            at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
            at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
       InnerException: System.Net.WebException
            Message="The remote server returned an error: NotFound"
            StackTrace:
                 at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                 at System.Net.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
                 at System.Net.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
            InnerException:

Any ideas that I should try?

Thanks Lars






Coordinator
Jan 5, 2009 at 6:52 PM
Hi,

1) Try rebuilding (force rebuild) the whole project.

2) Try debugging the WCF service to see if it ever connects to the service

Also check out these two pages to see if it fixes your problem:

http://dennyonline.wordpress.com/2008/02/26/the-type-service-provided-as-the-service-attribute-value-in-the-servicehost-directive-could-not-be-found/

http://blogs.msdn.com/chrsmith/archive/2006/08/10/WCF-service-nesting-in-IIS.aspx

Michiel

Jan 5, 2009 at 10:00 PM

Michiel,

Thanks for your help. In the end, I found a write-up on how to debug WCF services:

http://www.bbits.co.uk/blog/archive/2008/09/12/debugging-wcf-services-in-silverlight-2.aspx

Using the TraceListener, it said it couldn’t find the mpost.FileUploadServiceLibrary assembly! So I copied it to the ASP.NET bin folder and everything works.

Can you tell me how to force VS2008 to copy this library on each build to the bin folder?

Thanks Lars

From: mpost [mailto:notifications@codeplex.com]
Sent: Monday, January 05, 2009 10:52 AM
To: larclap@yahoo.com
Subject: Re: Another 'Upload failed' problem [SLFileUpload:43477]

From: mpost

Hi,

1) Try rebuilding (force rebuild) the whole project.

2) Try debugging the WCF service to see if it ever connects to the service

Also check out these two pages to see if it fixes your problem:

http://dennyonline.wordpress.com/2008/02/26/the-type-service-provided-as-the-service-attribute-value-in-the-servicehost-directive-could-not-be-found/

http://blogs.msdn.com/chrsmith/archive/2006/08/10/WCF-service-nesting-in-IIS.aspx

Michiel

Read the full discussion online.

To add a post to this discussion, reply to this email (SLFileUpload@discussions.codeplex.com)

To start a new discussion for this project, email SLFileUpload@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Jan 6, 2009 at 7:42 AM
You can re-add the reference from the website project to the mpost.FileUploadServiceLibrary. If it has a reference, it should copy the dll each time you build.

Glad it works now.