# GeoTiffRasterLayer: System.OutOfMemoryException and GdiPlusRasterLayer: GDI+ threw a status error code

**URL:** <https://community.thinkgeo.com/t/geotiffrasterlayer-system-outofmemoryexception-and-gdiplusrasterlayer-gdi-threw-a-status-error-code/6080>\
**Category:** WebForms\
**Created:** [December 28, 2011, 1:22pm UTC](https://community.thinkgeo.com/t/geotiffrasterlayer-system-outofmemoryexception-and-gdiplusrasterlayer-gdi-threw-a-status-error-code/6080 "2011-12-28T13:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amod](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/0ea827/32.png) [@Amod](https://community.thinkgeo.com/u/Amod)\
**Post date:** [December 28, 2011, 1:22pm UTC](https://community.thinkgeo.com/t/geotiffrasterlayer-system-outofmemoryexception-and-gdiplusrasterlayer-gdi-threw-a-status-error-code/6080/1 "2011-12-28T13:22:04Z")

</div>

I&nbsp;am&nbsp;currently&nbsp;evaluating&nbsp;Map&nbsp;Suite&nbsp;Web&nbsp;Edition.

I&nbsp;am&nbsp;using&nbsp;tif&nbsp;imagery&nbsp;and&nbsp;have&nbsp;problems&nbsp;with&nbsp;using&nbsp;both&nbsp;GdiPlusRasterLayer&nbsp;and&nbsp;GeoTiffRasterLayer.

The&nbsp;GeoTiffRasterLayer&nbsp;renders&nbsp;some&nbsp;of&nbsp;the&nbsp;tiles&nbsp;with&nbsp;the&nbsp;following&nbsp;text:&nbsp;Exception&nbsp;of&nbsp;type&nbsp;'System.OutOfMemoryException'&nbsp;was&nbsp;thrown.&nbsp;&nbsp;If&nbsp;I&nbsp;add&nbsp;layer.LibraryType&nbsp;=&nbsp;GeoTiffLibraryType.UnmanagedLibTiff;&nbsp;&nbsp;based&nbsp;on&nbsp;one&nbsp;of&nbsp;the&nbsp;replies&nbsp;I&nbsp;saw&nbsp;from&nbsp;support&nbsp;I&nbsp;get&nbsp;Exception&nbsp;has&nbsp;been&nbsp;thrown&nbsp;by&nbsp;the&nbsp;target&nbsp;of&nbsp;an&nbsp;invocation.

When&nbsp;using&nbsp;GdiPlusRasterLayer&nbsp;I&nbsp;some&nbsp;of&nbsp;the&nbsp;tiles&nbsp;show&nbsp;up&nbsp;with&nbsp;the&nbsp;following&nbsp;text:&nbsp;GDI+&nbsp;threw&nbsp;a&nbsp;status&nbsp;error&nbsp;code.&nbsp;&nbsp;This&nbsp;error&nbsp;comes&nbsp;up&nbsp;randomly.&nbsp;&nbsp;So&nbsp;it&nbsp;works&nbsp;for&nbsp;a&nbsp;little&nbsp;bit&nbsp;and&nbsp;if&nbsp;you&nbsp;pan&nbsp;zoom&nbsp;etc&nbsp;all&nbsp;of&nbsp;a&nbsp;sudden&nbsp;you&nbsp;start&nbsp;seeing&nbsp;this&nbsp;error&nbsp;on&nbsp;some&nbsp;of&nbsp;the&nbsp;tiles.

The&nbsp;raster&nbsp;data&nbsp;I&nbsp;am&nbsp;using&nbsp;is&nbsp;high&nbsp;resolution&nbsp;imagery&nbsp;(birds&nbsp;eye&nbsp;view)&nbsp;and&nbsp;the&nbsp;total&nbsp;size&nbsp;of&nbsp;all&nbsp;tif&nbsp;files&nbsp;is&nbsp;about&nbsp;2&nbsp;Gig.

Running&nbsp;this&nbsp;in&nbsp;Visual&nbsp;Studio&nbsp;2008&nbsp;on&nbsp;Vista&nbsp;x64&nbsp;with&nbsp;4Gigs&nbsp;of&nbsp;RAM.

Thanks

---

<div class="post-metadata">

**Author:** ![Amod](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/0ea827/32.png) [@Amod](https://community.thinkgeo.com/u/Amod)\
**Post date:** [December 29, 2011, 10:47am UTC](https://community.thinkgeo.com/t/geotiffrasterlayer-system-outofmemoryexception-and-gdiplusrasterlayer-gdi-threw-a-status-error-code/6080/2 "2011-12-29T10:47:37Z")

</div>

For&nbsp;anyone&nbsp;searching&nbsp;about&nbsp;similar&nbsp;issues&nbsp;issue&nbsp;here&nbsp;is&nbsp;what&nbsp;I&nbsp;have&nbsp;found&nbsp;out&nbsp;since&nbsp;I&nbsp;posted&nbsp;this:&nbsp;&nbsp;I&nbsp;get&nbsp;this&nbsp;issue&nbsp;only&nbsp;when&nbsp;I&nbsp;run&nbsp;from&nbsp;visual&nbsp;studio&nbsp;in&nbsp;the&nbsp;development&nbsp;web&nbsp;server.&nbsp;&nbsp;When&nbsp;I&nbsp;deploy&nbsp;this&nbsp;app&nbsp;to&nbsp;IIS&nbsp;it&nbsp;works&nbsp;fine.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [December 30, 2011, 3:33pm UTC](https://community.thinkgeo.com/t/geotiffrasterlayer-system-outofmemoryexception-and-gdiplusrasterlayer-gdi-threw-a-status-error-code/6080/3 "2011-12-30T15:33:20Z")

</div>

Hi&nbsp;Amod,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;update.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Unlucky&nbsp;we&nbsp;haven’t&nbsp;reproduced&nbsp;this&nbsp;problem&nbsp;in&nbsp;our&nbsp;enviornment&nbsp;because&nbsp;we&nbsp;haven’t&nbsp;found&nbsp;a&nbsp;good&nbsp;test&nbsp;data&nbsp;like&nbsp;yours.&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;mentioned&nbsp;under&nbsp;IIS&nbsp;that&nbsp;works&nbsp;well,&nbsp;is&nbsp;the&nbsp;IIS&nbsp;machine&nbsp;same&nbsp;with&nbsp;your&nbsp;develope&nbsp;machine?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don
