How to Prevent our website by Clickjacking in ASP.NET c#? [duplicate]
X-FRAME-Options Add this code in global.asax file. protected void Application_BeginRequest(object sender, EventArgs e) { HttpContext.Current.Response.AddHeader(“x-frame-options”, “DENY”); } OR simply add this to <system.webServer> in your Web.Config file <!–Clickjacking security–> <httpProtocol> <customHeaders> <add name=”X-Frame-Options” value=”DENY” /> </customHeaders> </httpProtocol> <!–End clickjacking–> This small snippet adds a http header called x-frame-options to your http responses and prevents your … Read more