0

I try to remove the Http header X-AspNetMvc-Version. I added this in Global.asax:

void Application_Start(object sender, EventArgs e)
{
    MvcHandler.DisableMvcResponseHeader = true;
}

but it doesn't work. In Firefox I can see X-AspNetMvc-Version: "5.1".

What am I doing wrong?

Andrei V
  • 7,306
  • 6
  • 44
  • 64
Alex Snigirev
  • 67
  • 2
  • 14

2 Answers2

0

Check to see if you have anything configured in the HTTP response headers in IIS.

ChrisBint
  • 12,773
  • 6
  • 40
  • 62
0

You might need to just stick this into your Global.asax.cs:

MvcHandler.DisableMvcResponseHeader = true;
Brendan Green
  • 11,676
  • 5
  • 44
  • 76