asp.net mvc 2 - Refused to display 'https://mytestwebsite.com/?wa=wsignoutcleanup1.0' in a frame because it set 'X-Frame-Options' to 'DENY' -


I have been developed by asp.net mvc2 and SQL Server 2012 as an authentication process for applications that have ADFS 2.0 I am using. In order to solve this issue: ClickJacking (aka cross-site framing or XSF), we have set x-frames-option with Price Denny in the web-config file.

Reproduction Steps: 1. Log in using the Chrome browser application using valid credentials. 2. The system showed me the app landing page. 3. Click on F12 to open Developer Tools option. 4. Now the Signout option was clicked and navigated to the console window. 5. The system has displayed an ADFS signout page, but I am still getting an error in the console window as explained below:

Because the refusal to display '' in one frame This 'x-frames-option' sets 'denny'

On checking the view surs of the ADFS Southeast page, I came to see the following:

    

Can someone tell me the best way to solve the above issue?

One option is to do nothing Important part of sign-out cleanup authentication cookie for mytestwebsite.com Is still to be removed, because the http header is still processed, even if the resultant iframe content is not displayed.

Allow iframe content to render is only important if:

  • Your web application further cleans down-stream signout. To wit. It includes your own IFrame tags to sign out other applications, or
  • your STS < Img & gt; A tag instead of iframes for sign-out cleanup, and you want a green tick picture that is visible to the WIF, or
  • In fact, it does not really want harmless error in your browser console Message will appear. / Li>

    If this is really necessary, you can add X-frame-options Denny for all responses except the WS-Federation Signout Cleanup Program program.

    For an asp.net MVC application, you can use (in Global.asax.cs):

      public override zero Init () {base. Init (); Federal Authority .Mr. SigningThat + = This.Confirmation AuthorityModownSigningAut; } Secure zero application_BeginRequest (Object Sender, EventArgs e) {Response.Headers ["X-Frame-Options"] = "DENY"; } Private Zero WSFederationAuthenticationModuleOnSigningOut (Object Sender, SigningOutEventArgs Args) {If (args.IsIPInitiated) {Response.Headers.Remove ("X-Frame-Options"); }}    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -