What is the effect of setting (or not) .NET CLR version in ASP.Net Core?

陌路散爱 提交于 2019-12-10 20:10:47

问题


What is the point of setting "No Managed Code" .NET CLR version for an IIS Asp.NET Core application pool?

Documentation says that

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.

Since it is optional, what are the drawbacks of keeping the default v4.0? Why the documentation explicitly instructs to set it to "No Managed Code"? It's not very clear whether there are performance concerns around this particular configuration.


回答1:


When you specify .NET CLR version as 4.0 for an application pool, IIS tried to load into its worker processes some ASP.NET supporting libraries (like aspnet_isapi.dll for classic pipeline mode, and webengine4.dll for integrated mode). Such increases memory usage and attack surface, and might also have other impact.

Therefore, if you only run non-ASP.NET 4.x apps (PHP, ASP.NET Core and so on), you can set "No Managed Code" to remove all the troubles.



来源:https://stackoverflow.com/questions/49185512/what-is-the-effect-of-setting-or-not-net-clr-version-in-asp-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!