I need to cloak certain headers generated by ASP.NET and IIS and returned in the responses from a ASP.NET WebAPI service. The headers I need to cloak are:
The problem is each one is added at a different point:
Server: added by IIS. Not exactly sure if it can be turned off although you seem to have been to remove it using HttpModule .X-AspNet-Version: added by System.Web.dll at the time of Flush in HttpResponse classX-AspNetMvc-Version: Added by MvcHandler in System.Web.dll. It can be overridden so this one should be OK.X-Powered-By by IIS but can be turned off as you said.I think your best bet is still using HttpModules.