Large array support in ASP.NET

2019-04-10 21:30发布

Recently with 4.5 .NET support, users can allocate more than 2 GB of memory for an object. In order to do that users can set the gcAllowVeryLargeObjects to true in the app.config file, and things would work fine.

However I am having difficulty in finding this setting for ASP.NET. I have an web site for which I need to test if this is really supported in our web site. I know that the VS inbuilt server is a 32 bit process. So it users can't simply launch the website and test it for large arrays.

Is this even possible with ASP.NET? I am using IIS7 to host my website.

2条回答
beautiful°
2楼-- · 2019-04-10 21:40

For me setting gcAllowVeryLargeObjects in the application web.config only worked when put in machine.config

查看更多
ら.Afraid
3楼-- · 2019-04-10 21:46

Acording to MSDN you can setup it at web.config as:

<configuration>
  <runtime>
    <gcAllowVeryLargeObjects enabled="true" />
  </runtime>
</configuration>

but its says:

true: Arrays greater than 2 GB in total size are enabled on 64-bit platforms.

so its not work on 32bit, meaning that you also need to run your pool on 64-bit.

ref: http://msdn.microsoft.com/en-us/library/hh285054.aspx

查看更多
登录 后发表回答