Win
Win

Reputation: 62260

EntityFramwork System.OutOfMemoryException on inserting 100MB to varbinary

Upload works fine for 62MB file. However, it throws exception if it is 100MB.

I found few questions in stackoverflow, but none is very specific about datatype.

Appreciate your help!

ASP.Net 4, IIS7, EntityFramework 4.1, Visual Studio 2010 SP1, SQL 2008

DataType is varbinary(max)

applicationHost.config

<section name="requestFiltering" overrideModeDefault="Allow" />

web.config

<httpRuntime maxRequestLength="1148576" executionTimeout="3600"/>

<security >
  <requestFiltering>
    <requestLimits maxAllowedContentLength="112400000" />
  </requestFiltering>
</security>

I use EntityDataModel. The following exception was thrown from designer.

enter image description here

enter image description here

Upvotes: 2

Views: 835

Answers (1)

usr
usr

Reputation: 171178

Looks like your file is too big for your memory. This is probably because the bytes of the file are copied a few times during your processing, multiplying their size in the process.

What surprises you about this error?

Upvotes: 2

Related Questions