Skip to content

Commit 5c40f82

Browse files
Update buffer size (#34923)
* Update buffer size * change to 1 MB and default 17 MB * Apply suggestions from code review * Update aspnetcore/host-and-deploy/iis/advanced.md
1 parent 2cc050c commit 5c40f82

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

aspnetcore/host-and-deploy/iis/advanced.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Advanced configuration with the ASP.NET Core Module and Internet In
55
monikerRange: '>= aspnetcore-5.0'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 10/09/2023
8+
ms.date: 03/07/2025
99
uid: host-and-deploy/iis/advanced
1010
---
1111
# Advanced configuration of the ASP.NET Core Module and IIS
@@ -18,6 +18,7 @@ This article covers advanced configuration options and scenarios for the ASP.NET
1818

1919
*Only applies when using the in-process hosting model.*
2020

21+
:::moniker range="> aspnetcore-9.0"
2122
Configure the managed stack size using the `stackSize` setting in bytes in hexadecimal in the `web.config` file. The default size is 1,048,576 bytes (1 MB) expressed in hexadecimal. The following example changes the stack size to 2 MB (2,097,152 bytes) in hexadecimal 0x200000:
2223

2324
```xml
@@ -32,6 +33,26 @@ Configure the managed stack size using the `stackSize` setting in bytes in hexad
3233
</aspNetCore>
3334
```
3435

36+
:::moniker-end
37+
38+
:::moniker range="<= aspnetcore-9.0"
39+
40+
Configure the managed stack size using the `stackSize` setting in bytes in the `web.config` file. The default size is 17,825,792 bytes (17 MB). The following example changes the stack size to 100,000 hex, (1 MB):
41+
42+
```xml
43+
<aspNetCore processPath="dotnet"
44+
arguments=".\MyApp.dll"
45+
stdoutLogEnabled="false"
46+
stdoutLogFile="\\?\%home%\LogFiles\stdout"
47+
hostingModel="inprocess">
48+
<handlerSettings>
49+
<handlerSetting name="stackSize" value="100000" />
50+
</handlerSettings>
51+
</aspNetCore>
52+
```
53+
54+
:::moniker-end
55+
3556
## Disallow rotation on config
3657

3758
The `disallowRotationOnConfigChange` setting is intended for blue/green scenarios where a change to global config should not cause all sites to recycle. When this flag is true, only changes relevant to the site itself will cause it to recycle. For example, a site recycles if its *web.config* changes or something changes that is relevant to the site's path from IIS's perspective. But a general change to *applicationHost.config* would not cause an app to recycle. The following example sets this setting to true:

0 commit comments

Comments
 (0)