Last post Apr 06, 2010 05:46 PM by timallard
Oct 20, 2009 06:28 AM|balajicodeit|LINK
I have a C++ code which reads a file [vtk file - its similar to text file only]. and try to store it in string.
here's the code:
String^ ParallelProjectionRenderer::GetVolumeDataAsString(String^ FileName)
vtkSmartPointer<vtkDataSetWriter> sWriter = vtkSmartPointer<vtkDataSetWriter>::New();
String^ FileName = "D:\\Users\\...";
char * sptName = static_cast<char *>(Marshal::StringToHGlobalAnsi(FileName).ToPointer());
String^ result= File::ReadAllText(FileName); [it breaks here with system.memoryoutofexception when the file size is huge]
this code executes fine when the file size is less than 8mb.
I wanted to know whats the maximum memory allocated to the string.
As a workaround i skipped reading out in C++ code. and i tried to read the file contents in asp.net C# code and store it on string.
Same sort of exception came.
Basically i need this result in string bcoz, I need to communicate with the Silverlight component.
So is there a way for this issue?
Thanx in advance,
"Maximum memory allocated for string"
Apr 06, 2010 05:46 PM|timallard|LINK
My hunch is that your limit is from an IIS setting for maximum size, think it's in machine.config on the webserver.