Ext net elements are not shown when authentication added

  1. #1

    Ext net elements are not shown when authentication added

    Ext net UI elements are not shown after I added authentication in web.config to redirect all unauthorized access to the login page. Everything works fine if I remove this constraint. Is this normal Ext net behaviour? Any help on how to solved this would be much appreciated. Below is my login form which displays an empty page.

    <ext:ResourceManager runat="server" />
        <ext:Viewport runat="server">
            <LayoutConfig>
                <ext:VBoxLayoutConfig Align="Center" Pack="Center" />
            </LayoutConfig>
            <Items>
                <ext:FormPanel
                    runat="server"
                    Title="Login"
                    Width="400"
                    Frame="true"
                    BodyPadding="13"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:TextField
                        ID="txtUsername"
                        runat="server"
                        FieldLabel="Username"
                        AllowBlank="false"
                        BlankText="Your username is required."
                        />
                    <ext:TextField
                        ID="txtPassword"
                        runat="server"
                        InputType="Password"
                        FieldLabel="Password"
                        AllowBlank="false"
                        BlankText="Your password is required."
                        />
                        <ext:Checkbox runat="server" FieldLabel="Remember me" Name="remember" ID="chkRememberMe"/>
                    </Items>
                    <Buttons>
                        <ext:Button ID="btnEnter" runat="server" Text="GiriÅŸ Yap" Icon="Accept" OnDirectClick="btnEnter_DirectClick"/>
                        <ext:Button ID="btnPassword" runat="server" Text="Åžifremi Unuttum" Icon="LockKey">
                     </ext:Button>
                    </Buttons>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
    </body>
    WEb.config

      <authentication mode="Forms">
           <forms name=".ASPXFORMSLOGIN" loginUrl="LoginScreen.aspx"
           timeout="30" slidingExpiration="true" />
        </authentication>
        <authorization>
          <deny users="?"/>
          <allow users="*"/>
        </authorization>
  2. #2
    Hello!

    Edit Global.asax
    You need to update your Application_AuthenticateRequest function to IGNORE the ext elements. Then it will work fine!

    good luck!
    /Z

            protected void Application_AuthenticateRequest(object sender, System.EventArgs e)
            {
                string url = HttpContext.Current.Request.RawUrl.ToLower();
                if (url.Contains("ext.axd"))
                {
                    HttpContext.Current.SkipAuthorization = true;
                }
    }
  3. #3
    Thank you Z for the reply. I ended up using a normal login form but it will try ignore the ext code as you suggested

Similar Threads

  1. [CLOSED] Messed up IDs of elements of dynamically added user control
    By Hlodvig in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2013, 10:53 PM
  2. Replies: 12
    Last Post: Jun 04, 2012, 11:18 AM
  3. Replies: 2
    Last Post: Oct 11, 2011, 1:15 PM
  4. [CLOSED] Redirection and authentication HELP!
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 18, 2010, 11:58 AM
  5. Authentication?
    By dbassett74 in forum 1.x Help
    Replies: 1
    Last Post: Apr 23, 2009, 12:47 PM

Tags for this Thread

Posting Permissions