Results 1 to 5 of 5

Thread: Ext.form.FormPanel and ASP.NET Forms Authentication

  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    249

    Default Ext.form.FormPanel and ASP.NET Forms Authentication

    After authentication's cookie has been expired I submit form and get HTTP 302. Ext.form.FormPanel's listeners (actioncomplete/actionfailed) and Ext.form.FormPanel.getForm().submit({success/failure}) don't catch this response. An error is occured in ext-all-debug.js (line 8274) (ExtJS ver. 3.3.0). How to catch this response?

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You can't catch a HTTP status 302. XmlHttpRequest will automatically follow the redirect and respond with the data from the next page.

    You'll have to configure your server to redirect to a page with, e.g. a 403 HTTP status. (401 would be more appropriate, but Firefox incorrectly responds to that by showing the basic login dialog).

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    249

    Default

    Quote Originally Posted by Condor View Post
    You'll have to configure your server to redirect to a page with, e.g. a 403 HTTP status. (401 would be more appropriate, but Firefox incorrectly responds to that by showing the basic login dialog).
    How I can make it? (IIS 6)

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    No idea. I got it working on WebSphere, but I don't use IIS.

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    249

    Default

    global.asax.cs
    Code:
    protected void Application_AuthenticateRequest(object sender, EventArgs e)
    {
        if ((Context.User == null || !Context.User.Identity.IsAuthenticated)
            && Context.Request.Headers["X-Requested-With"] == "XMLHttpRequest")
        {
            Context.Response.StatusCode = 403;
            Context.Response.End();
        }
    }

Similar Threads

  1. No form submit with ASP.NET and Ext.Window
    By mclerte in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 27 Apr 2009, 12:23 PM
  2. [SOLVED][2.2] Problem with ASP.NET Forms
    By elnove in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 11 Aug 2008, 4:04 AM
  3. ASP.NET, forms and splinter discussion group
    By donalconlon in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 Dec 2007, 10:14 AM
  4. Forms+ASP.Net, TextField, ComboBox : Problems
    By ferr in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 19 Oct 2007, 1:54 PM
  5. Asp.net Dropdown List & Ext.form.ComboBox
    By guptan in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 23 Jun 2007, 1:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •