<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Uploading files and validating them using the ASP.NET FileUpload and CustomValidator controls</title>
	<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/</link>
	<description>Quality ASP.NET/C#/SQL Server tutorials, examples, videos and advice</description>
	<pubDate>Thu, 09 Feb 2012 17:50:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Guy</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-288</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Wed, 07 Jul 2010 14:13:29 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-288</guid>
		<description>How do you notify the client that the file upload process can take a long time? Is there any way to do a progress bar? I am writing code using the File Upload control to upload video files. Once the user hits submit a check is made on the filename (Using FileUpload.Filename). Once this code runs it can take a significant amount time before the server responds back. Is it true the entire file is sent to the server to get the contents of the posted file? If that is true then it can take a long time to let the user know whether the file is valid or not. During that time there appears not to be a method to tell the user this process will take time.

Any help or ideas with this?</description>
		<content:encoded><![CDATA[<p>How do you notify the client that the file upload process can take a long time? Is there any way to do a progress bar? I am writing code using the File Upload control to upload video files. Once the user hits submit a check is made on the filename (Using FileUpload.Filename). Once this code runs it can take a significant amount time before the server responds back. Is it true the entire file is sent to the server to get the contents of the posted file? If that is true then it can take a long time to let the user know whether the file is valid or not. During that time there appears not to be a method to tell the user this process will take time.</p>
<p>Any help or ideas with this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajan</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-268</link>
		<dc:creator>Sajan</dc:creator>
		<pubDate>Mon, 15 Mar 2010 22:10:29 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-268</guid>
		<description>Some one please help me out. Once after selecting the file by using browse file upload, onchange event how can i call server side code.</description>
		<content:encoded><![CDATA[<p>Some one please help me out. Once after selecting the file by using browse file upload, onchange event how can i call server side code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-221</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Sun, 29 Nov 2009 04:32:05 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-221</guid>
		<description>It is a great tutorial.
This worked great locally, but as soon as I tested it live I have permission's deny error.
What are the proper permissions for an upload folder with IIS?
And how can I keep secure my website if I give IUser write permission? 
Thanks</description>
		<content:encoded><![CDATA[<p>It is a great tutorial.<br />
This worked great locally, but as soon as I tested it live I have permission&#8217;s deny error.<br />
What are the proper permissions for an upload folder with IIS?<br />
And how can I keep secure my website if I give IUser write permission?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prabhakar</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-193</link>
		<dc:creator>prabhakar</dc:creator>
		<pubDate>Sat, 19 Sep 2009 10:59:05 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-193</guid>
		<description>Hi,
Thanks a lot for your article...i want to upload multiple files at a time nearly 100.is it possible to do so....can you help me.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks a lot for your article&#8230;i want to upload multiple files at a time nearly 100.is it possible to do so&#8230;.can you help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sacha</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-178</link>
		<dc:creator>Sacha</dc:creator>
		<pubDate>Mon, 31 Aug 2009 21:27:35 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-178</guid>
		<description>One thing to consider with FileUpload is that you can update the control properties like FileUpload.FileName without causing EventValidation to trigger. This allows you to provide an empty ViewState and no EventValidation and the Page.IsPostBack will return true and the request will work even if you try to mitigate against CSRF using Page.ViewStateUserKey.</description>
		<content:encoded><![CDATA[<p>One thing to consider with FileUpload is that you can update the control properties like FileUpload.FileName without causing EventValidation to trigger. This allows you to provide an empty ViewState and no EventValidation and the Page.IsPostBack will return true and the request will work even if you try to mitigate against CSRF using Page.ViewStateUserKey.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amey pai</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-177</link>
		<dc:creator>amey pai</dc:creator>
		<pubDate>Sat, 29 Aug 2009 07:05:41 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-177</guid>
		<description>Hi, 
Thanks a lot for ur article.. it helped me a lot.... realized lot many mistakes in my programming style...

Cheers!!!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks a lot for ur article.. it helped me a lot&#8230;. realized lot many mistakes in my programming style&#8230;</p>
<p>Cheers!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-125</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 04 Jun 2009 14:24:31 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-125</guid>
		<description>Chris,

An int can hold values from -2,147,483,648 to 2,147,483,647. That means that ContentLength can specify up to 2GB, not 2MB.

As for checking the size of the file before an upload occurs, that would require you to have code running on the client. Think Java applet or embedded ActiveX or .NET control. What Ted is showing here is server-side code. At the point his code is running, the file has already been sent as part of the HTTP POST.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>An int can hold values from -2,147,483,648 to 2,147,483,647. That means that ContentLength can specify up to 2GB, not 2MB.</p>
<p>As for checking the size of the file before an upload occurs, that would require you to have code running on the client. Think Java applet or embedded ActiveX or .NET control. What Ted is showing here is server-side code. At the point his code is running, the file has already been sent as part of the HTTP POST.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sajid</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-121</link>
		<dc:creator>sajid</dc:creator>
		<pubDate>Wed, 27 May 2009 10:25:18 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-121</guid>
		<description>its giving an error in web.config on line no 78 to i.e 

Error	68	Child nodes not allowed. (C:\Documents and Settings\sajid\Desktop\Check This FirstLab16_csharpuniversity\Lab16_csharpuniversity\web.config line 78)</description>
		<content:encoded><![CDATA[<p>its giving an error in web.config on line no 78 to i.e </p>
<p>Error	68	Child nodes not allowed. (C:\Documents and Settings\sajid\Desktop\Check This FirstLab16_csharpuniversity\Lab16_csharpuniversity\web.config line 78)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ted</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-110</link>
		<dc:creator>ted</dc:creator>
		<pubDate>Tue, 19 May 2009 00:23:38 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-110</guid>
		<description>Thanks Chris,

First look at comment #4 in the blog post.
To restrict the file size to 7MB, set the maxRequestLength in your web.config file to "7168".  The maxRequestLength variable's value is specified in KB, so you can multiply 1024 * [MAX file size in MB] to determine what to put in this variable.

Even though the file will be uploaded into RAM, it will NOT be saved to the hard drive if the validation rules fail.  So it is as though the file was not uploaded.</description>
		<content:encoded><![CDATA[<p>Thanks Chris,</p>
<p>First look at comment #4 in the blog post.<br />
To restrict the file size to 7MB, set the maxRequestLength in your web.config file to &#8220;7168&#8243;.  The maxRequestLength variable&#8217;s value is specified in KB, so you can multiply 1024 * [MAX file size in MB] to determine what to put in this variable.</p>
<p>Even though the file will be uploaded into RAM, it will NOT be saved to the hard drive if the validation rules fail.  So it is as though the file was not uploaded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Schaller</title>
		<link>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-109</link>
		<dc:creator>Chris Schaller</dc:creator>
		<pubDate>Mon, 18 May 2009 21:06:17 +0000</pubDate>
		<guid>http://www.csharpuniversity.com/2009/03/05/uploading-files-and-validating-them-using-the-aspnet-fileupload-and-customvalidator-controls/#comment-109</guid>
		<description>I have a client who wants to restrict filesize to 7MB. But the postedfile.ContentLength is integer so that maxes out at 2MB!

It looks liek to me that in general you should check the Stream length... but does that cause the stream to be opened and consumed? I don't want my check method to actually cause an upload of the file until after I have checked the length. 

I know it's common for Web servers to default to a max upload of 2MB, but it seems strange int this age to use an integer to represent a file size in any situation.</description>
		<content:encoded><![CDATA[<p>I have a client who wants to restrict filesize to 7MB. But the postedfile.ContentLength is integer so that maxes out at 2MB!</p>
<p>It looks liek to me that in general you should check the Stream length&#8230; but does that cause the stream to be opened and consumed? I don&#8217;t want my check method to actually cause an upload of the file until after I have checked the length. </p>
<p>I know it&#8217;s common for Web servers to default to a max upload of 2MB, but it seems strange int this age to use an integer to represent a file size in any situation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

