<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: File Upload in Silverlight - a Simple Solution</title>
	<atom:link href="http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/</link>
	<description>Do it to get it</description>
	<pubDate>Sat, 31 Jul 2010 09:53:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniel</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1163</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 20 Jul 2010 18:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1163</guid>
		<description>hi,

for all interested there is a little bug in code which causes incomplete file uploads.

Here is the fix for this:

instead of line:
_data.Read(fileContent, 0, CHUNK_SIZE);
write:
  int bytesRead = _data.Read(fileContent, 0, CHUNK_SIZE);
instead of line:
 wc.OpenWriteAsync(u, null, fileContent);
write:
 wc.OpenWriteAsync(u, null, new object[]{ fileContent, bytesRead});
instead of lines:
byte[] fileContent == e.UserState as byte[];
 Stream outputStream = e.Result;
                outputStream.Write(fileContent, 0, fileContext.length);
                outputStream.Close();
write:
 object[] objArr = e.UserState as object[];
                byte[] fileContent = objArr[0] as byte[];
                int bytesRead = Convert.ToInt32(objArr[1]);
  Stream outputStream = e.Result;
                outputStream.Write(fileContent, 0, bytesRead);
                outputStream.Close();
and u are done.

hope this help someone else.

with kind regards 
daniel</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>for all interested there is a little bug in code which causes incomplete file uploads.</p>
<p>Here is the fix for this:</p>
<p>instead of line:<br />
_data.Read(fileContent, 0, CHUNK_SIZE);<br />
write:<br />
  int bytesRead = _data.Read(fileContent, 0, CHUNK_SIZE);<br />
instead of line:<br />
 wc.OpenWriteAsync(u, null, fileContent);<br />
write:<br />
 wc.OpenWriteAsync(u, null, new object[]{ fileContent, bytesRead});<br />
instead of lines:<br />
byte[] fileContent == e.UserState as byte[];<br />
 Stream outputStream = e.Result;<br />
                outputStream.Write(fileContent, 0, fileContext.length);<br />
                outputStream.Close();<br />
write:<br />
 object[] objArr = e.UserState as object[];<br />
                byte[] fileContent = objArr[0] as byte[];<br />
                int bytesRead = Convert.ToInt32(objArr[1]);<br />
  Stream outputStream = e.Result;<br />
                outputStream.Write(fileContent, 0, bytesRead);<br />
                outputStream.Close();<br />
and u are done.</p>
<p>hope this help someone else.</p>
<p>with kind regards<br />
daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toni</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1150</link>
		<dc:creator>Toni</dc:creator>
		<pubDate>Fri, 16 Jul 2010 17:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1150</guid>
		<description>Hi Greg,

I've tested out the code and it Throws an IOException (damn!) at me. 

I realise it might be a bit late to post right now (duh), but I'm using Silverlight 4 and have many problems with file upload.

Is it really that hard?

The application I'm programming is a simple crop and resize app that only needs Upload implemented now - and it's driving me crazy.

Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>I&#8217;ve tested out the code and it Throws an IOException (damn!) at me. </p>
<p>I realise it might be a bit late to post right now (duh), but I&#8217;m using Silverlight 4 and have many problems with file upload.</p>
<p>Is it really that hard?</p>
<p>The application I&#8217;m programming is a simple crop and resize app that only needs Upload implemented now - and it&#8217;s driving me crazy.</p>
<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vidya shekar</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1085</link>
		<dc:creator>vidya shekar</dc:creator>
		<pubDate>Wed, 05 May 2010 11:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1085</guid>
		<description>Can any one please tell how to run this application after published in iis

string UPLOAD_URI = "http://localhost:50323/FileUpload.ashx?filename={0}&#38;append={1}";</description>
		<content:encoded><![CDATA[<p>Can any one please tell how to run this application after published in iis</p>
<p>string UPLOAD_URI = &#8220;http://localhost:50323/FileUpload.ashx?filename={0}&amp;append={1}&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Fickes</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-730</link>
		<dc:creator>Eric Fickes</dc:creator>
		<pubDate>Wed, 03 Mar 2010 02:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-730</guid>
		<description>Hey Gergely,

http://www.yourethemannowdog.com!

Thanks for posting this.  I just tried it in my own SL / ASP.NET project and it worked like a champ!

BTW, have you ever made an SL uploader that returns data back to SL?  I was hoping for the server to return the uploaded path on complete.</description>
		<content:encoded><![CDATA[<p>Hey Gergely,</p>
<p><a href="http://www.yourethemannowdog.com" rel="nofollow">http://www.yourethemannowdog.com</a>!</p>
<p>Thanks for posting this.  I just tried it in my own SL / ASP.NET project and it worked like a champ!</p>
<p>BTW, have you ever made an SL uploader that returns data back to SL?  I was hoping for the server to return the uploaded path on complete.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maxishare</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-722</link>
		<dc:creator>maxishare</dc:creator>
		<pubDate>Sun, 28 Feb 2010 11:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-722</guid>
		<description>nice work good solution thanks</description>
		<content:encoded><![CDATA[<p>nice work good solution thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anupam Jana</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-706</link>
		<dc:creator>Anupam Jana</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-706</guid>
		<description>Hi,
Great example.
When I execute the application using
public const string UPLOAD_URI = "http://localhost:2502/FileUpload.ashx?filename={0}&#38;append={1}";
It is working fine.
But when I deployed this application in IIS server and try to upload file, it is not uploading file.
Than I change the public const string UPLOAD_URI = "http://10.0.20.220:2502/TestFileUpload/FileUpload.ashx?filename={0}&#38;append={1}";
TestFileUpload in the virtual dir.

Please can you tell me what I am doing worng.
Thanks in advance.

Regards,
Anuapm
Anupam.jana@enfs.com/anupam_jana@yahoo.com</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Great example.<br />
When I execute the application using<br />
public const string UPLOAD_URI = &#8220;http://localhost:2502/FileUpload.ashx?filename={0}&amp;append={1}&#8221;;<br />
It is working fine.<br />
But when I deployed this application in IIS server and try to upload file, it is not uploading file.<br />
Than I change the public const string UPLOAD_URI = &#8220;http://10.0.20.220:2502/TestFileUpload/FileUpload.ashx?filename={0}&amp;append={1}&#8221;;<br />
TestFileUpload in the virtual dir.</p>
<p>Please can you tell me what I am doing worng.<br />
Thanks in advance.</p>
<p>Regards,<br />
Anuapm<br />
<a href="mailto:Anupam.jana@enfs.com">Anupam.jana@enfs.com</a>/anupam_jana@yahoo.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bomanden</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-701</link>
		<dc:creator>Bomanden</dc:creator>
		<pubDate>Sat, 20 Feb 2010 13:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-701</guid>
		<description>Hi great example .. Any of you php sharks who can provide that bit of code that Greg is talking about : eg: copy unfinished files in a temp folder until upload is complete and then move them to the upload folder 

Cheers /Bo</description>
		<content:encoded><![CDATA[<p>Hi great example .. Any of you php sharks who can provide that bit of code that Greg is talking about : eg: copy unfinished files in a temp folder until upload is complete and then move them to the upload folder </p>
<p>Cheers /Bo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hyspdrt</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-693</link>
		<dc:creator>hyspdrt</dc:creator>
		<pubDate>Tue, 09 Feb 2010 20:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-693</guid>
		<description>There is a new Silverlight File Upload and Download control suite on codeplex. http://interlink.codeplex.com</description>
		<content:encoded><![CDATA[<p>There is a new Silverlight File Upload and Download control suite on codeplex. <a href="http://interlink.codeplex.com" rel="nofollow">http://interlink.codeplex.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fausto</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-687</link>
		<dc:creator>fausto</dc:creator>
		<pubDate>Tue, 02 Feb 2010 20:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-687</guid>
		<description>Hello Greg,

do you have same sample but in visual basic???

Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Hello Greg,</p>
<p>do you have same sample but in visual basic???</p>
<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DEN</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-684</link>
		<dc:creator>DEN</dc:creator>
		<pubDate>Thu, 28 Jan 2010 06:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-684</guid>
		<description>i got a question, how do i save the uploaded file to my server specific location?
In asp.net, it is using SaveAs(Server.Path("../location"));
so how in silverlight?</description>
		<content:encoded><![CDATA[<p>i got a question, how do i save the uploaded file to my server specific location?<br />
In asp.net, it is using SaveAs(Server.Path(&#8221;../location&#8221;));<br />
so how in silverlight?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
