<?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 &#8211; 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>
	<lastBuildDate>Fri, 03 Feb 2012 04:37:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: hjp</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1696</link>
		<dc:creator>hjp</dc:creator>
		<pubDate>Sun, 15 Jan 2012 03:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1696</guid>
		<description>Hi, Sorry for the previous post, I am using vb.net and I had to make the following change to make it work correctly  
 _bytesUploaded += (fileContent.Length - 1)
instead of 
 _bytesUploaded += fileContent.Length
Thanks anyway for the simple coding I am using your cause its pretty simple for my small application.</description>
		<content:encoded><![CDATA[<p>Hi, Sorry for the previous post, I am using vb.net and I had to make the following change to make it work correctly<br />
 _bytesUploaded += (fileContent.Length &#8211; 1)<br />
instead of<br />
 _bytesUploaded += fileContent.Length<br />
Thanks anyway for the simple coding I am using your cause its pretty simple for my small application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hjp</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1695</link>
		<dc:creator>hjp</dc:creator>
		<pubDate>Sun, 15 Jan 2012 03:06:36 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1695</guid>
		<description>Hi, I downloaded your new version and still get corrupted file for xlsx and so I tried 300kb text file and found out the text written in it is not in sequence so if we make 4 round trip to server the 3 write event is writing it data even before 2 write event and I am sure that can mess up any xlsx or other file. Please let me know. Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi, I downloaded your new version and still get corrupted file for xlsx and so I tried 300kb text file and found out the text written in it is not in sequence so if we make 4 round trip to server the 3 write event is writing it data even before 2 write event and I am sure that can mess up any xlsx or other file. Please let me know. Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isambert</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1694</link>
		<dc:creator>isambert</dc:creator>
		<pubDate>Fri, 06 Jan 2012 18:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1694</guid>
		<description>you can use also the Session to save partial byte[] and then create the file only in the last byte upload</description>
		<content:encoded><![CDATA[<p>you can use also the Session to save partial byte[] and then create the file only in the last byte upload</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1692</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 03 Jan 2012 19:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1692</guid>
		<description>Nevermind, I have found a solution. I have added the following code. AFTER it writes to the outputstream you must call writestreamclosed event:

private void wc_WriteStreamClosed(object sender, WriteStreamClosedEventArgs e)
        {
            if (e.Error == null)
            {
                if (_imgbytesUploaded &lt; _imgbytesTotal)
                {
                    string CurrentTime = GetTimestamp(DateTime.Now.ToUniversalTime());
                    UploadFile(_imgName, CurrentTime, _imgdata);
                }
                else
                {
                    currentlyuploading = false;
                    string CurrentTime = GetTimestamp(DateTime.Now.ToUniversalTime());
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(&quot;http://www.gintechsystems.com/uploadwpmobilephotocomplete.php?imgName=&quot; + _imgName + &quot;&amp;imgSize=&quot; + _imgbytesTotal + &quot;&amp;gid=&quot; + gintechuser.UserID + &quot;&amp;t=&quot; + CurrentTime);
                    request.Method = &quot;GET&quot;;
                    request.BeginGetResponse(new AsyncCallback(GetResponseUserCallback), request);
                }
            }
        }

I also enabled the following (not sure if it helps though lol)

wc.AllowReadStreamBuffering = true;
            wc.AllowWriteStreamBuffering = true;

Hope this helps somehow.</description>
		<content:encoded><![CDATA[<p>Nevermind, I have found a solution. I have added the following code. AFTER it writes to the outputstream you must call writestreamclosed event:</p>
<p>private void wc_WriteStreamClosed(object sender, WriteStreamClosedEventArgs e)<br />
        {<br />
            if (e.Error == null)<br />
            {<br />
                if (_imgbytesUploaded &lt; _imgbytesTotal)<br />
                {<br />
                    string CurrentTime = GetTimestamp(DateTime.Now.ToUniversalTime());<br />
                    UploadFile(_imgName, CurrentTime, _imgdata);<br />
                }<br />
                else<br />
                {<br />
                    currentlyuploading = false;<br />
                    string CurrentTime = GetTimestamp(DateTime.Now.ToUniversalTime());<br />
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(&quot;http://www.gintechsystems.com/uploadwpmobilephotocomplete.php?imgName=&quot; + _imgName + &quot;&amp;imgSize=&quot; + _imgbytesTotal + &quot;&amp;gid=&quot; + gintechuser.UserID + &quot;&amp;t=&quot; + CurrentTime);<br />
                    request.Method = &quot;GET&quot;;<br />
                    request.BeginGetResponse(new AsyncCallback(GetResponseUserCallback), request);<br />
                }<br />
            }<br />
        }</p>
<p>I also enabled the following (not sure if it helps though lol)</p>
<p>wc.AllowReadStreamBuffering = true;<br />
            wc.AllowWriteStreamBuffering = true;</p>
<p>Hope this helps somehow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1691</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 03 Jan 2012 19:29:19 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1691</guid>
		<description>So how would you go about putting it in order? This method does work very well and my php code works perfect just out of order, maybe some packet loss but that can be easily fixed zipping the file when sending the bytes then unzipping on the server. Any examples how how to put this in order using a simple mechanism?</description>
		<content:encoded><![CDATA[<p>So how would you go about putting it in order? This method does work very well and my php code works perfect just out of order, maybe some packet loss but that can be easily fixed zipping the file when sending the bytes then unzipping on the server. Any examples how how to put this in order using a simple mechanism?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1689</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 27 Dec 2011 17:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1689</guid>
		<description>@Martin -- Well, yes, you have identified a flaw, and there is no reason to believe this design would work as it stands.... There has to be added to it a mechanism to ensure the packets are reassembled in correct order...kind of like is done in TCP.</description>
		<content:encoded><![CDATA[<p>@Martin &#8212; Well, yes, you have identified a flaw, and there is no reason to believe this design would work as it stands&#8230;. There has to be added to it a mechanism to ensure the packets are reassembled in correct order&#8230;kind of like is done in TCP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Free Download Software, Games, Movie, eBook, Music, TV-Shows, GFX</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1686</link>
		<dc:creator>Free Download Software, Games, Movie, eBook, Music, TV-Shows, GFX</dc:creator>
		<pubDate>Tue, 20 Dec 2011 14:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1686</guid>
		<description>&lt;strong&gt;Free Download Software, Games, Movie, eBook, Music, TV-Shows, GFX...&lt;/strong&gt;

[...]Greg Does IT &#187; Blog Archive &#187; File Upload in Silverlight &#8211; a Simple Solution[...]...</description>
		<content:encoded><![CDATA[<p><strong>Free Download Software, Games, Movie, eBook, Music, TV-Shows, GFX&#8230;</strong></p>
<p>[...]Greg Does IT &raquo; Blog Archive &raquo; File Upload in Silverlight &#8211; a Simple Solution[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1681</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 16 Dec 2011 15:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1681</guid>
		<description>Follow up, using hexedit I noticed that the chunks are being saved out of order.</description>
		<content:encoded><![CDATA[<p>Follow up, using hexedit I noticed that the chunks are being saved out of order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1680</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 16 Dec 2011 14:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1680</guid>
		<description>Hi,

Any idea why this upload method corrupts .xslx files?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Any idea why this upload method corrupts .xslx files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Welcome to GFXshare.us - Free GFX source for you</title>
		<link>http://gregdoesit.com/2009/10/file-upload-in-silverlight-a-simple-solution/comment-page-1/#comment-1670</link>
		<dc:creator>Welcome to GFXshare.us - Free GFX source for you</dc:creator>
		<pubDate>Tue, 06 Dec 2011 10:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://gregdoesit.com/?p=265#comment-1670</guid>
		<description>&lt;strong&gt;Welcome to GFXshare.us - Free GFX source for you...&lt;/strong&gt;

[...]Greg Does IT &#187; Blog Archive &#187; File Upload in Silverlight &#8211; a Simple Solution[...]...</description>
		<content:encoded><![CDATA[<p><strong>Welcome to GFXshare.us &#8211; Free GFX source for you&#8230;</strong></p>
<p>[...]Greg Does IT &raquo; Blog Archive &raquo; File Upload in Silverlight &#8211; a Simple Solution[...]&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

