silverlight and System.OutOfMemoryException 100MB????

silverlight and System.OutOfMemoryException 100MB????

Old forum URL: forums.lhotka.net/forums/t/9840.aspx


emadalsous posted on Tuesday, December 07, 2010

hello, iam using CSLA.NET 4.0 with silverlight 4

and iam using compression CsharpZipLib , what i got here that the silverlight application

giving me maximum size for memory is about 100MB and the object became up of it

it will throw system.outofmemoryexception, i found this in the compression utility class

which is used for compression when i big number of bytes it throws this error, idiscovered this with

files while i was trying to upload file, but what is making me worry that my application may

get 500,000 row in one request how ever the compression was working i will get

big size of data , does any one has any suggestion about how to increase

the used memory for silverlight application more that 100MB ?

Mr X replied on Thursday, January 13, 2011

I seem to remember Rocky talking about changing the buffer sizes in his Silverlight video series. I think you need to increase the buffer sizes in your web application's web.config and in the Silverlight's application's Servicereference.ServiceConfig files. 

Change from 10000000 to 2147483647.

Hope this solve your problem.

 

 

tmg4340 replied on Thursday, January 13, 2011

I think the 100MB limit is a hard Silverlight limit, though I'm not sure.

I'll also mention that I can't imagine creating an effective UI to manage half a million rows of data.  Surely there is some other way of dealing with that to reduce your payload?  I know that people always say "my users want all the data", but there is simply no way that a user is realistically working with that much data in one shot.  You can't remember 500,000 separate things, and I just can't see how a user would even look at 500,000 records in one sitting...

HTH

- Scott

RockfordLhotka replied on Thursday, January 13, 2011

Wow! Even if the application really does need to go through 500k items, I'd implement some sort of windowed paging model. But that is pretty ridiculous, and operations on data sets of that size should be performed in the database, or maybe on an application server, but not on the client.

emadalsous replied on Monday, January 17, 2011

hello, thank you for your response. rock you are right it's rediciolous to send 500 thousand row to the client

but some times we need to send a file to the server like file upload and that file will not be saved in folder it will be sent to the database.

i created base class which makes every readonly list pagable and i used it with all of my windows

it worked preety enough. but what iwanted to solve about file uploading for the big file size to the database

thank you and best regards

Mr X replied on Monday, January 17, 2011

This may be a setting in IIS.  I needed to send XML (generated from the database) to a report formatter through IIS (v6 if I remember correctly) and it was not getting the whole file.  this was done through an ASP page though, the settings may be different for you.  Here is what I had to do:

 Note: before changing anything, make sure you find proper documentation and talk to your system admin. Hope this helps.

To modify the buffer size:

 

Open IIS and right click the server and select properties.

 

Check the box that says “Allow changes to the MetaBase.xml”.  If you don’t, you will find the MetaBase.xml is locked.

 

Open with Notepad the MetaBase.xml.  Its location should be “C:\Windows\system32\inetserv\”

 

To modify the uploading limit, find the variable “ASPMaxRequestEntityAllowed” (the default value should be 204800 (200K)) and change it to the desired size.

 

To modify the downloading limit, find the variable “ASPBufferingLimit” (the default size should be around 4 Megs) and change it to the desired size.  By changing this variable, you are changing the max size of ASP response buffer.

 

By modifying the value of these variables, you can control the size of the upload and downloads allowed by IIS.

Better practices recommend going back and unchecking the box “Allow changes to the MetaBase.xml” in IIS.

Copyright (c) Marimer LLC