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?

3
  • 1
    Possible duplicate of stackoverflow.com/questions/3418557/… Commented Aug 26, 2014 at 9:53
  • there is no answer to my question Commented Aug 26, 2014 at 9:59
  • What happens if you retrieve MvcHandler.DisableMvcResponseHeader later on? Is it still set to true? Commented Aug 26, 2014 at 10:02

2 Answers 2

0

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

MvcHandler.DisableMvcResponseHeader = true;
Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

Have a one response : X-Powered-By

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.