Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible in IIS7, without using URL Scan to remove the Server in the response header? I have tried the following:

HttpModule

I've installed a signed one into the GAC and also tried the App_Code directory and neither has worked. I've also tried setting the

HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\DisableServerHeader 

registry entry to 1 and still nothing.

EDIT: I've also tried this: Community ISAPI filter

Is there any possible way to do this?

share|improve this question
    
Your question appears to be a duplicate of serverfault.com/questions/24885/… which should solve your problem. –  Michael Mar 27 '12 at 21:52
    
possible duplicate of How to remove IIS/ASP.NET Response Headers –  pauska Mar 27 '12 at 22:58
    
When I asked this (18 months ago), that question did not have any IIS7 answers to it that worked for me. –  Corv1nus Mar 29 '12 at 12:56
add comment

1 Answer

I've tried adding the following to my application-level "Web.Config" file with varying degrees of success:

  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <remove name="ETag" />
        <remove name="Server" />
        <remove name="X-AspNet-Version" />
        <remove name="X-AspNetMvc-Version" />
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>

This only applies to content served out of the application directory (and subdirectories) and doesn't work when applied to the "applicationHost.config" file underneath the "System32/inetsrv/config" directory. I've also had this change not work at all (how I came across your question here while researching this issue), so your mileage may vary.

share|improve this answer
    
Doesn't remove the Server header –  PsychoDad May 18 '12 at 16:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.