System.OutOfMemoryException
-
Dear Friends, I am frequently come across error called "System.OutOfMemoryException". whent this error come I need to restart my server. I search on google it suggested that iis memory get full. My concern is what cause this memory get full and how to avoid this error. THANKS IN ADVANCE.
-
Dear Friends, I am frequently come across error called "System.OutOfMemoryException". whent this error come I need to restart my server. I search on google it suggested that iis memory get full. My concern is what cause this memory get full and how to avoid this error. THANKS IN ADVANCE.
Generally the cause of this is: Reading large data sets into memory. Creating excessive cache entries. Uploading or downloading large files. Excessive use of regular expressions or strings while parsing files. Excessive view state. Too much data in session state or too many sessions. Maybe if you are using Reports it may sometimes eat up the whole memory. Increase the memory of IIS and also do optimisation to your code so that you dont use much of your server space ....
Abhishek Sur
-
Dear Friends, I am frequently come across error called "System.OutOfMemoryException". whent this error come I need to restart my server. I search on google it suggested that iis memory get full. My concern is what cause this memory get full and how to avoid this error. THANKS IN ADVANCE.
Your application might be written poorly. Some tips 1 - Avoid using DataSet/DataTable for reading data. Use DataReader and fill your custom collection classes. 2 - Use paged results 3 - Always call
Dispose
method on types which implementsIDisposable
. You can wrap it inside ausing
block which calls Dispose automatically when scope ends.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions