<?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: 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>
	<lastBuildDate>Fri, 06 Jan 2012 16:25:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sachin</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-88</link>
		<dc:creator>Sachin</dc:creator>
		<pubDate>Fri, 07 Aug 2009 17:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-88</guid>
		<description>I get an error as fn not declared in line below

        Try
          Response.TransmitFile(fn)
        Catch ex As Exception
          &#039; redirect to error opening file page
        End Try

download.aspx while</description>
		<content:encoded><![CDATA[<p>I get an error as fn not declared in line below</p>
<p>        Try<br />
          Response.TransmitFile(fn)<br />
        Catch ex As Exception<br />
          &#8216; redirect to error opening file page<br />
        End Try</p>
<p>download.aspx while</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mr alex weir</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-86</link>
		<dc:creator>mr alex weir</dc:creator>
		<pubDate>Fri, 27 Mar 2009 09:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-86</guid>
		<description>dear dev
I am writing an asp.net website using windows live ID authentication.  We will have a lot of pdf, word and excel files whose accessibility will depend on the WLID.  How can I ensure that people looking over the shoulder cannot view those files directly?  I am guessing 2 ways, but maybe you have more/better:

1.  hide the url and give the files random names (I dont know how to hide the url in asp.net)

2.  store the files in a non-accessible directory and temporary copy over the file required to an accesible directory with a random file name.  The file will be deleted after a preset time (e.g. 10-20 minutes)

pls advise

thanks

Alex Weir, Harare and Gaborone</description>
		<content:encoded><![CDATA[<p>dear dev<br />
I am writing an asp.net website using windows live ID authentication.  We will have a lot of pdf, word and excel files whose accessibility will depend on the WLID.  How can I ensure that people looking over the shoulder cannot view those files directly?  I am guessing 2 ways, but maybe you have more/better:</p>
<p>1.  hide the url and give the files random names (I dont know how to hide the url in asp.net)</p>
<p>2.  store the files in a non-accessible directory and temporary copy over the file required to an accesible directory with a random file name.  The file will be deleted after a preset time (e.g. 10-20 minutes)</p>
<p>pls advise</p>
<p>thanks</p>
<p>Alex Weir, Harare and Gaborone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-87</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Fri, 12 Dec 2008 16:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-87</guid>
		<description>Does it show the download progress correctly or say time remaining unknown?</description>
		<content:encoded><![CDATA[<p>Does it show the download progress correctly or say time remaining unknown?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-85</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Wed, 06 Aug 2008 08:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-85</guid>
		<description>Sir,

Hello . I want to prevent video files from downloading. I have a webpage to play. Suppose they have download manager means all are download it easily. so how can i prevent video files downloading......</description>
		<content:encoded><![CDATA[<p>Sir,</p>
<p>Hello . I want to prevent video files from downloading. I have a webpage to play. Suppose they have download manager means all are download it easily. so how can i prevent video files downloading&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrew</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-84</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Fri, 25 Jul 2008 10:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-84</guid>
		<description>very good post, but I found this method doesn&#039;t supports the Resume download option, do you know how to implement this?

it would be very nice!</description>
		<content:encoded><![CDATA[<p>very good post, but I found this method doesn&#8217;t supports the Resume download option, do you know how to implement this?</p>
<p>it would be very nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://devsushi.com/2007/01/31/aspnet-file-download-protection-through-authentication/comment-page-1/#comment-83</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 26 Jul 2007 16:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-83</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-page-1/#comment-80</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 03 Mar 2007 14:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-80</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&#039;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-page-1/#comment-82</link>
		<dc:creator>Izzy</dc:creator>
		<pubDate>Sat, 24 Feb 2007 11:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-82</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-page-1/#comment-81</link>
		<dc:creator>Izzy</dc:creator>
		<pubDate>Sat, 24 Feb 2007 11:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2007/01/31/aspnet-file-download-protection-through-authentication/#comment-81</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&#039;t corrupt your users data for sensitive files =)</description>
		<content:encoded><![CDATA[<p>There is a mistake in:<br />
  ReDim fbytes(fs.Length &#8211; 1)<br />
  fs.Read(fbytes, 0, fs.Length &#8211; 1)</p>
<p>Should be:<br />
  ReDim fbytes(fs.Length &#8211; 1)<br />
  fs.Read(fbytes, 0, fs.Length &#8211; 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>

