Frequently Asked Questions

[FAQ Online]


Save file stream to MS SQL Database.

Problem

Out of memory error occurred during saving a large file into database.

Cause

A common practice to reduce the amount of memory used when writing a BLOB value is to write the BLOB to the database in "chunks".

Resolution

    1. Create a new file table record with empty image column.
    2. Create SqlBlobStream and assign with new record.
    3. Read file chunk from incoming stream and write to output SqlBlobStream.
    4. Close SqlBlobStream.

IIS 7 and Getting 404.13 error on the website.

Problem

You may get HTTP Error 404.13 – CONTENT_LENGTH_TOO_LARGE error on the website hosted on IIS7.

Cause

Request filtering is configured on the Web server to deny the request because the content length exceeds the configured value.

The requested URL tries to upload a file of size that is greater than that set in the maxAllowedContentLength property of the <requestLimits> node under <requestFiltering>

Resolution

    1. Open the %SystemRoot%\system32\inetsrv\config\applicationHost.config file
    2. Search for the section <requestLimits> section
    3. Remove the maxAllowedContentLength property (default is 30000000) or a value which matches the size of the file you are trying to upload.
    4. <requestLimits maxAllowedContentLength="30000000" /> or <requestLimits />
    5. Now, browse to any URL e.g: http://localhost/mywebpage.aspx

Copyright 2007 Mediachase. All rights reserved.