Error when uploading

Jan 22, 2009 at 4:36 PM
Sorry, I've been stuck on this issue and can't figure it out. Everything works great on my local machine, but when I put it on my shared web hosting server and do these steps:
Select a file to upload
Click Upload
>> It doesn't show progress or anything in the control

I get this error:

Message: Unhandled Error in Silverlight 2 Application An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at System.Net.DownloadStringCompletedEventArgs.get_Result()
   at DC.FileUpload.FileUpload.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
   at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e)
   at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
Line: 1
Char: 1
Code: 0

Since I didn't really care if the user was asked if the file already exists, I tried removing the DownladStringCompleted (CheckFileOnServer()) and then get an error in ReadCallBack(). All in the FileUpload.cs. I've tried changing the web.config, I've tried all sorts of things. I'm guessing it might be a setting in IIS or something since the code runs on my local machine, but not on the server, but since I don't have direct access to the IIS on the server, I can't look. Anything jump out that I could ask the hosting company to look at? Or is it something I'm doing wrong?
Coordinator
Jan 22, 2009 at 4:38 PM
Did you give write access to the user the web application is running under? It only needs write access to the folder you are uploading to.
Darick




From: [email removed]
To: [email removed]
Date: Thu, 22 Jan 2009 08:36:22 -0800
Subject: Error when uploading [SilverlightFileUpld:44950]


From: bruss147
Sorry, I've been stuck on this issue and can't figure it out. Everything works great on my local machine, but when I put it on my shared web hosting server and do these steps:
Select a file to upload
Click Upload
>> It doesn't show progress or anything in the control

I get this error:

Message: Unhandled Error in Silverlight 2 Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at System.Net.DownloadStringCompletedEventArgs.get_Result()
at DC.FileUpload.FileUpload.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e)
at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
Line: 1
Char: 1
Code: 0

Since I didn't really care if the user was asked if the file already exists, I tried removing the DownladStringCompleted (CheckFileOnServer()) and then get an error in ReadCallBack(). All in the FileUpload.cs. I've tried changing the web.config, I've tried all sorts of things. I'm guessing it might be a setting in IIS or something since the code runs on my local machine, but not on the server, but since I don't have direct access to the IIS on the server, I can't look. Anything jump out that I could ask the hosting company to look at? Or is it something I'm doing wrong?
Read the full discussion online.
To add a post to this discussion, reply to this email (SilverlightFileUpld@discussions.codeplex.com)
To start a new discussion for this project, email SilverlightFileUpld@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


Windows Live™: E-mail. Chat. Share. Get more ways to connect. Check it out.
Jan 22, 2009 at 4:39 PM
Yes, I did. Other things I have are able to write to that folder.
Coordinator
Jan 22, 2009 at 4:41 PM
Try writing out the error. You can do it using try catch blocks or in the global.asa file. Usually the error being thrown in silverlight isn't all that helpful.


From: [email removed]
To: [email removed]
Date: Thu, 22 Jan 2009 08:39:32 -0800
Subject: Re: Error when uploading [SilverlightFileUpld:44950]

From: bruss147
Yes, I did. Other things I have are able to write to that folder.
Read the full discussion online.
To add a post to this discussion, reply to this email (SilverlightFileUpld@discussions.codeplex.com)
To start a new discussion for this project, email SilverlightFileUpld@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


Windows Live™: E-mail. Chat. Share. Get more ways to connect. See how it works.
Jan 22, 2009 at 6:15 PM
Seems it has to be a setting on the server. I can't get them to admit it either and it's very frustrating. If I move the code out to my web root, it works just fine. It just doesn't work in the web application that I want it to. Thanks for your help.
Jan 22, 2009 at 6:46 PM
YES! Thanks for all your help. After trying three different support people at my hosting service, I found one that fixed the MIME type on my web app and now everything is working great!
Coordinator
Jan 22, 2009 at 8:54 PM
I'm glad to hear that you got it worked out!
Darick




From: [email removed]
To: [email removed]
Date: Thu, 22 Jan 2009 10:46:21 -0800
Subject: Re: Error when uploading [SilverlightFileUpld:44950]


From: bruss147
YES! Thanks for all your help. After trying three different support people at my hosting service, I found one that fixed the MIME type on my web app and now everything is working great!
Read the full discussion online.
To add a post to this discussion, reply to this email (SilverlightFileUpld@discussions.codeplex.com)
To start a new discussion for this project, email SilverlightFileUpld@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


Windows Live™ Hotmail®…more than just e-mail. See how it works.
Apr 4, 2009 at 1:31 AM
bruss147, which MIME type needed to be set?  I am having the same problem @ networksolutions.

I am using the .net 2.0 solution.  The Silverlight control draws, but I can't upload.  I get the same error.
May 20, 2009 at 12:49 AM

bruss147 - Please, which mime type needed to be set.  I'm having the same problem with my server.

thanx

r

May 22, 2009 at 4:55 PM

I am using the .net 3.5 solution.  The Silverlight control shown up, but I can't upload.  I get the same error.

May 22, 2009 at 5:28 PM

My difficulty came from requesting a file from the server that didn't necessarily exist *yet*.

In this case, the downloadasync handler actually throws an error.  My solution to this ( since I knew that even if the file wasnt there yet, it would be produced shortly) was to catch the error, and re-try the original request after a short delay.  This resolved all of my download problems.

r