Ext.Net Window problem with loading external website into content frame

  1. #1

    Ext.Net Window problem with loading external website into content frame

    Hello to all,

    I'm using Ext.Net 4 and C# Code-Behind in ascx.cs-Files. Working with Visual Studio 12 and .Net-Framework 4.5.

    I want to load an external Website into a window as Content. When I load the site "http://ext.net" it works. But when I want to load the site "http://web.de" it doesn' t work, because the site can't be load into a Frame: "This content can not be displayed within a frame". How can I solve the Problem?

    My ext.net ascx-File:

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="XXXXX.ascx.cs" Inherits="XXXXXXX" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <ext:Window
        ID="TestWindow"
        Title="Test"
        Height="750" Width="750"
        Modal="true" AutoRender="false" 
        Collapsible="true" Maximizable="true" Hidden="true"
        runat="server">
        <Loader ID="LoaderViewDocument" 
            runat="server"
            AutoLoad="false"
            Url="http://web.de"
            Mode="Frame">
            <LoadMask ShowMask="true" />
        </Loader>
    </ext:Window>


    And my code behind ascx.cs file:

    [DirectMethod]
    public void DoLoadWindow()
    {
        this.TestWindow.Hidden = false;
        this.TestWindow.LoadContent();
        this.TestWindow.Show();
    }
    Trying it too with loader params in ascx:
    TriggerEvent="show"
    ReloadOnEvent="true"
    DisableCaching="true"

    Even when I set the Url-Parameter in code behind instead in ext.net directly:
    this.TestWindow.LoadContent(url);
    it doesn' t work with some Url's.
    With http://ext.net or http://www.cnn.com there is no Problem.

    Thank you for your answers!

    Best regards
  2. #2
    Hello Guest, and welcome to Ext.NET forums!

    This seems not to be a problem related to Ext.NET, but with the website not allowing itself to be loaded into a frame.

    It really looks like the problem described in this stackoverflow discussion: IFrame: This content cannot be displayed in a frame

    I hope this helps!

    EDIT: Check out this simple HTML code:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
        Let's see whether the IFrame works for Ext.NET:<br />
        <iframe src="http://ext.net" width="100%" height="200"></iframe><br /><br />
        Now for web.de:<br />
        <iframe src="http://web.de" width="100%" height="200"></iframe>
    </body>
    </html>
    This indicates as something the target website disallowed and browsers obey, something beyond Ext.NET's scope.

    EDIT2: The website http://web.de/ explicitly forbids to be displayed in frames by its HTTP headers:

    HTTP/1.1 200 OK
    Date: Thu, 19 May 2016 17:23:29 GMT
    Server: Apache
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Pragma: no-cache
    Cache-Control: no-cache, no-store
    X-Frame-Options: deny
    Content-Type: text/html;charset=UTF-8
    Set-Cookie: ui_cid=7UEuAYfC4MKDBo21CmO7; Expires=Wed, 17-Aug-2016 17:23:29 GMT; Path=/
    Set-Cookie: um_cvt=UzHGLQpIBTMAABjAgjcAAAGX;domain=web.de;HttpOnly
    Set-Cookie: SSLB=.0; domain=web.de ;path=/
    Vary: Accept-Encoding
    Line 7 is the header denying browsers to display it on iframes.
    Last edited by fabricio.murta; May 19, 2016 at 5:25 PM.
  3. #3
    Hello Fabricio!

    Thank you for your answer. It's just what I thought. But I thought maybe there's a Workaround...

    When I open it in a new tab it works. I just tried it with JavaScript "window.open". But then I have problems with popup-blocker.
    So I want to open an external Website in a new browser window. How can I do it in Ext.Net?

    Many thanks for an answer.

    Best regards

Similar Threads

  1. Replies: 5
    Last Post: Jun 20, 2018, 1:53 PM
  2. Replies: 6
    Last Post: Dec 22, 2014, 12:21 PM
  3. Window not rendering frame for content
    By jbarbeau in forum 2.x Help
    Replies: 2
    Last Post: Sep 02, 2014, 5:21 PM
  4. [CLOSED] Loading External Page in Ext.Window is not working
    By Tarun_Chand in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 04, 2013, 1:06 PM
  5. Loading External page to window Problem
    By alpeter in forum 1.x Help
    Replies: 0
    Last Post: Jan 17, 2013, 12:48 PM

Posting Permissions