<?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"
	>
<channel>
	<title>Comments on: ASP.Net file download protection through authentication</title>
	<atom:link href="http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/</link>
	<description>Discussion on Development in Several Different Flavours</description>
	<pubDate>Fri, 04 Jul 2008 17:54:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Mark</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-13955</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 26 Jul 2007 16:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-13955</guid>
		<description>I had to undertake the same task as you did so I wrote an article on it.  But my guide illustrates an example using php. :)

The example is at: http://www.marksanborn.net/php/download-files-through-authentication/</description>
		<content:encoded><![CDATA[<p>I had to undertake the same task as you did so I wrote an article on it.  But my guide illustrates an example using php. :)</p>
<p>The example is at: <a href="http://www.marksanborn.net/php/download-files-through-authentication/" rel="nofollow">http://www.marksanborn.net/php/download-files-through-authentication/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1996</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 03 Mar 2007 14:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1996</guid>
		<description>You are absolutely correct, thanks!

While testing your change I ran into a much simpler method of attaching the file (Response.TransmitFile). I've updated the post to use it instead since it removes the complexity and potential for errors.</description>
		<content:encoded><![CDATA[<p>You are absolutely correct, thanks!</p>
<p>While testing your change I ran into a much simpler method of attaching the file (Response.TransmitFile). I&#8217;ve updated the post to use it instead since it removes the complexity and potential for errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Izzy</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1608</link>
		<dc:creator>Izzy</dc:creator>
		<pubDate>Sat, 24 Feb 2007 11:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1608</guid>
		<description>Oops, I mean the mistake in (oh, the irony):
ReDim fbytes(fs.Length)
fs.Read(fbytes, 0, fs.Length)

Yea, we all copy and paste :-/</description>
		<content:encoded><![CDATA[<p>Oops, I mean the mistake in (oh, the irony):<br />
ReDim fbytes(fs.Length)<br />
fs.Read(fbytes, 0, fs.Length)</p>
<p>Yea, we all copy and paste :-/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Izzy</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1607</link>
		<dc:creator>Izzy</dc:creator>
		<pubDate>Sat, 24 Feb 2007 11:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-1607</guid>
		<description>There is a mistake in:
  ReDim fbytes(fs.Length - 1)
  fs.Read(fbytes, 0, fs.Length - 1)

Should be:
  ReDim fbytes(fs.Length - 1)
  fs.Read(fbytes, 0, fs.Length - 1)

You are adding an extra byte to the end of the file without this -1 in the code.  This is because arrays start counting elements at 0 and .Length starts counting at 1...  This way you don't corrupt your users data for sensitive files =)</description>
		<content:encoded><![CDATA[<p>There is a mistake in:<br />
  ReDim fbytes(fs.Length - 1)<br />
  fs.Read(fbytes, 0, fs.Length - 1)</p>
<p>Should be:<br />
  ReDim fbytes(fs.Length - 1)<br />
  fs.Read(fbytes, 0, fs.Length - 1)</p>
<p>You are adding an extra byte to the end of the file without this -1 in the code.  This is because arrays start counting elements at 0 and .Length starts counting at 1&#8230;  This way you don&#8217;t corrupt your users data for sensitive files =)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
