Securing my ASP.net MVC3 Website aganist "Click jacking"

asp.net-mvc-3, visual-studio-2010

Solution

In your Global.asax you can add the following

protected void Application_BeginRequest(object sender, EventArgs e)
{
    HttpContext.Current.Response.AddHeader("x-frame-options", "SAMEORIGIN");
}

Problem

Recently I was flipping through some security issues faced by websites. Fortunately come across a new term "Click jacking" I understood that this attack happens only if my website is loadable in an IFrame. Further investigation helped to know that setting "x-frame-options" to "DENY" prevent the website been loaded in IFrame But I Don't know how to implement this as I am very new to this domain?

Original source