Removing X-Powered-By ASP.Net

Đăng ký tài khoản kiếm tiền với tiếp thị liên kết tại ACCESSTRADE, MasOffer, Lazada Việt Nam

Do not show response header

Server Microsoft-IIS/7.5
X-AspNetMvc-Version 3.0
X-AspNet-Version 4.0.303319
X-Powered-By ASP.NET
Removing X-AspNet-Version

Web.config

<system.web>
<httpRuntime enableVersionHeader=”false”/>

Removing X-AspNetMvc-Version

Global.asax.cs

protected void Application_Start()
{
MvcHandler.DisableMvcResponseHeader = true;
}

Removing or changing Server

In Global.asax.cs add this:

protected void Application_PreSendRequestHeaders()
{
//Response.Headers.Remove(“Server”); //Remove header
Response.Headers.Set(“Server”,”ServerName”); //Change Server header
Response.Headers.Remove(“X-AspNet-Version”); //alternative to above solution
Response.Headers.Remove(“X-AspNetMvc-Version”); //alternative to above solution
}

Removing or changing X-Powered-By

IIS 7 – You can also remove the X-Powered-By header by including these lines to the <system.webServer> element:

<httpProtocol>
<customHeaders>
<remove name=”X-Powered-By” />
</customHeaders>
</httpProtocol>

or manually go to IIS7 Management Console and open HTTP Response Headers

Source: https://ict.ken.be/removing-x-powered-by-aspnet-and-other-version-headers

ASP.NET C# MVC5

ASP.NET C# MVC5

Đánh giá bài chia sẻ
Nếu bạn mong muốn tìm hiểu rõ hơn về chia sẻ này và những chia sẻ khác, bạn có thể kết nối với mình qua các thông tin sau:
Facebook cá nhân: https://www.facebook.com/PExpress
Blog chia sẻ cá nhân: PolygonExpress.com
Group chia sẻ ứng dụng affiliate marketing & services: MMO tools
Web dịch vụ freelance: FMMSPolygon.com
Email liên hệ mình: fmmspolygon@gmail.com
Điện thoại: 0937.798.420 - 0868.929.024 (Kim Ngọc)

Related

Leave a Reply

Your email address will not be published. Required fields are marked *