IIS7~IIS8.5 delete or modify the server protocol header Server

IIS7~IIS8.5 delete or modify the server protocol header Server

Requirements: Remove HTTP response headers in IIS 7, 7.5, 8.0, 8.5 and ASP.NET, and modify or hide Server header information in IIS 7, 7.5, 8.0, 8.5.

Solution: Use url-rewrite rules

1. Install http://www.iis.net/downloads/microsoft/url-rewrite first

123WORDPRESS.COM download https://www.jb51.net/softs/614384.html

2. Copy the following to web.config

<rewrite>  
 <outboundRules rewriteBeforeCache="true">
  <rule name="Remove Server header">
   <match serverVariable="RESPONSE_Server" pattern=".+" />
   <action type="Rewrite" value="Apache" />
  </rule>
 </outboundRules>
</rewrite>

Note that this is the returned Server protocol header, and the value can be modified as required.

3. Restart IIS

If the above operation does not work, please refer to the following article

Remove X-Powered-By HTTP header

The method to remove the X-Powered-By HTTP header in IIS7 is:

1 Start IIS Manager
2 Click the computer name
3 Select the site you want to modify and double-click the HTTP response header section
4 All custom HTTP headers are here. To delete the corresponding header, just click the Remove button on the right.

Remove X-AspNet-Version HTTP header

Modify the web.config configuration file and add the following line in the <system.web> block

<httpRuntime enableVersionHeader="false" />

Remove X-AspNetMvc-Version HTTP header

Set the DisableMvcResponseHeader property of the MvcHandler class to True in the Application_Start event of Global.asax
MvcHandler.DisableMvcResponseHeader = True

Remove the Server HTTP header

Download UrlScan
Download the setup MSI file for UrlScan 3.1 from one of the following URLs to your computer:
x86: http://www.microsoft.com/downloads/details.aspx?FamilyID=ee41818f-3363-4e24-9940-321603531989
x64: http://www.microsoft.com/downloads/details.aspx?FamilyID=361e5598-c1bd-46b8-b3e7-3980e8bdf0de

After installing UrlScan (IIS-Metabase, the IIS 6 metabase compatibility component, needs to be installed),
Modify the C:\Windows\System32\inetsrv\urlscan\UrlScan.ini file and set RemoveServerHeader=1

Then restart IIS

Well, that’s all for this article. I hope you will support 123WORDPRESS.COM in the future.

<<:  Detailed explanation of virtual DOM in Vue source code analysis

>>:  MySQL infrastructure tutorial: detailed explanation of the query statement execution process

Recommend

Hide div in HTML Hide table TABLE or DIV content css style

I solved a problem tonight that has been botherin...

Six ways to reduce the size of Docker images

Since I started working on Vulhub in 2017, I have...

Do designers need to learn to code?

Often, after a web design is completed, the desig...

Detailed explanation of the use of React.cloneElement

Table of contents The role of cloneElement Usage ...

Excel export always fails in docker environment

Excel export always fails in the docker environme...

Navicat multiple ways to modify MySQL database password

Method 1: Use the SET PASSWORD command First log ...

Ubuntu 20.04 turns on hidden recording noise reduction function (recommended)

Recently, when using kazam in Ubuntu 20.04 for re...

Linux server quick uninstall and install node environment (easy to get started)

1. Uninstall npm first sudo npm uninstall npm -g ...

How to create a swap partition file in Linux

Introduction to Swap Swap (i.e. swap partition) i...

Web page creation question: Image file path

This article is original by 123WORDPRESS.COM Ligh...

Detailed explanation of execution context and call stack in JavaScript

Table of contents 1. What is the execution contex...

How to use the Linux more command in Linux common commands

more is one of our most commonly used tools. The ...

js version to realize calculator function

This article example shares the specific code of ...

Table td picture horizontally and vertically centered code

Html code: Copy code The code is as follows: <t...

WeChat applet realizes multi-line text scrolling effect

This article example shares the specific code for...