ASP.NET FileUpload component maximum filesize

February 16, 2007

By default, ASP.NET permits only files that are 4,096 Kb to be uploaded to the Web server. When you try to upload a larger file you will get a “page could not be displayed message” within your browser.

Resolution
Add the following element to the web.config file (in the system.web section) of your web application and change the maxRequestLength according to your needs;

<httpRuntime
executionTimeout=”90″
maxRequestLength=”4096″
useFullyQualifiedRedirectUrl=”false”
minFreeThreads=”8″
minLocalRequestFreeThreads=”4″
appRequestQueueLimit=”100″
/>

Additional information
http://support.microsoft.com/kb/323245

Displaying a datetime value in YYYYMMDD format

January 31, 2007

Use

CONVERT

Syntax

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

Samples

Today in YYYYMMDD format

CONVERT (CHAR(8), GetDate(), 112)

Yesterday in YYYYMMDD format

SELECT CONVERT (CHAR(8), (DATEADD(Day, -1, getdate())), 112)

Current time in HH:MM:SS format

CONVERT (CHAR(8), GetDate(), 108)