gpt4 book ai didi

asp.net - 更改 Azure 应用服务的 ASP.NET 版本

转载 作者:行者123 更新时间:2023-12-02 23:44:45 24 4
gpt4 key购买 nike

我们的应用程序有一个 header ,指定 X-AspNet-Version → 4.0.30319 。这很糟糕,不仅因为我们显示了我们正在使用的版本,那些有恶意的人可能会利用该版本来攻击我们,而且还因为该版本本身存在许多漏洞。我的问题不是如何隐藏标题,我已经弄清楚了,而是我想实际升级版本。我正在使用 Azure 应用程序服务,并在我的 web.config 中文件我已尝试以下代码但无济于事。

<httpRuntime targetFramework="4.7.1" />

header 仍显示相同的内容 ( X-AspNet-Version → 4.0.30319 )。我该如何更新这个?这是我无法控制的事情吗?我什至没有在我的应用程序中使用 ASP.NET。

最佳答案

How am I suppose to update this? Is it something that I can't control?

简短的回答是我们做不到。 X-AspNet-Version → 4.0.30319 不是实际的 .NET 框架版本。这是 CLR 的版本。 .Net 4、4.5及更高版本发布的CLR版本包含CLR 4

更多信息请引用.NET Framework versions and dependencies

The CLR is identified by its own version number. The .NET Framework version number is incremented at each release, although the CLR version is not always incremented. For example, the .NET Framework 4, 4.5, and later releases include CLR 4, but the .NET Framework 2.0, 3.0, and 3.5 include CLR 2.0. (There was no version 3 of the CLR.)

<小时/>

This is bad not only because we're displaying which version we're using, which those with malicious intent could use against us, but also because the version itself has many vulnerabilities.

出于安全原因,正如您提到的,您可以隐藏 header 。

关于asp.net - 更改 Azure 应用服务的 ASP.NET 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53308717/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com