I'm trying to remove the Server Header which discloses IIS version but couldn't. I'm using IIS Express 10 with ASP.NET Core 3.0 and have developed a Web API. I've tried below options but still header is present in response and reveals the Version IIS 10.0.
Changed registry key "DisableServerHeader" in HTTP Parameters to 1. It only removed Server header of http.sys module not the IIS version.
Used below code in applicationhost.config file within
<system.webServer>
tag<rewrite> <outboundRules rewriteBeforeCache="true"> <rule name="Remove Server header"> <match serverVariable="RESPONSE_Server" pattern=".+" /> <action type="Rewrite" value="" /> </rule> </outboundRules> </rewrite>