为 IIS Asp.NET Core 应用程序池设置“无托管代码”.NET CLR 版本有什么意义?
Documentation说
ASP.NET Core runs in a separate process and manages the runtime. ASP.NET Core doesn't rely on loading the desktop CLR. Setting the .NET CLR version to No Managed Code is optional.
既然是可选 ,保持默认有什么弊端? v4.0 ?为什么文档明确指示将其设置为“无托管代码”?目前还不清楚这个特定配置是否存在性能问题。
最佳答案
当您为应用程序池指定 .NET CLR 版本为 4.0 时,IIS 会将一些 ASP.NET 支持库加载到其工作进程中(例如 aspnet_isapi.dll
用于经典管道模式,webengine4.dll
用于集成模式)。这会增加内存使用量和攻击面,并且还可能产生其他影响。
因此,如果您只运行非 ASP.NET 4.x 应用程序(PHP、ASP.NET Core 等),您可以设置“无托管代码”来消除所有麻烦。
关于iis - 在 ASP.Net Core 中设置(或不设置).NET CLR 版本有什么影响?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49185512/