I have struct as following
public struct Data
{
public readonly long Start;
public readonly long End;
public Data(long start, long end)
{
Start = start;
End = end;
}
}
Data[] dataRange = new Data[150000000]; // here thrown "array dimensions exceeded supported range" exceptions.
Array declaration supported only up to a length of 134217724. I assume 2GB is still limited even though it has gcAllowVeryLargeObjects enabled.
The same array is working fine with my separate ConsoleApplication whereas not working in Asp project.
I have struct as following
public struct Data
{
public readonly long Start;
public readonly long End;
public Data(long start, long end)
{
Start = start;
End = end;
}
}
Data[] dataRange = new Data[150000000]; // here thrown "array dimensions exceeded supported range" exceptions.
Array declaration supported only up to a length of 134217724. I assume 2GB is still limited even though it has gcAllowVeryLargeObjects enabled.
The same array is working fine with my separate ConsoleApplication whereas not working in Asp project.
Share Improve this question asked Mar 13 at 9:35 Gowtham DharmarajanGowtham Dharmarajan 2343 silver badges17 bronze badges 5 |1 Answer
Reset to default 0For Asp web sites, we need to add gcallowverylargeobjects key in the C:\Windows\
Microsoft.NET
\Framework64\v4.0.30319\Config\machine.config
file to <runtime> section. web.config is not enough.
Array.MaxLength
? – JonasH Commented Mar 13 at 10:52