[CLOSED] [Trunk] Can no longer Redirect in DirectEvent

  1. #1

    [CLOSED] [Trunk] Can no longer Redirect in DirectEvent

    This used to work...

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <script runat="server">
    	protected void Page_Load( object sender, EventArgs e ) {
    	}
    	public void OnClick( object sender, DirectEventArgs e ) {
    		//X.Msg.Alert( "Test", "Test" ).Show();
    		Context.Response.Redirect("/T/Test35.aspx");
    	}
    </script>
    
    
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
    	<title>Test36</title>
    </head>
    <body>
    	<form id="Form1" runat="server">
    		<ext:ResourceManager ID="ResourceManager1" runat="server" ViewStateMode="Enabled" ScriptMode="Debug" SourceFormatting="true" />
    		<ext:Viewport ID="vp" runat="server">
    			<Items>
    				<ext:Button ID="Btn" runat="server" Text="Redirect">
    				<DirectEvents>
    					<Click OnEvent="OnClick" >
    						<Confirmation ConfirmRequest="true" Message="Are you sure?" Title="Confirm" />
    					</Click>
    				</DirectEvents>
    				</ext:Button>
    			</Items>
    		<Items>
    
    
    		</Items>
    		</ext:Viewport>
    
    
    	</form>
    </body>
    </html>
    This now posts a Request Failure window. No Status Code, No Status Text.

    The only way to get passed this show-stopper is to convert everything to X.Redirect which runs other client-side code.
    Last edited by Baidaly; Oct 15, 2013 at 1:14 AM. Reason: [CLOSED]
  2. #2
    Hi

    I cannot rerpoduce nothing strange, for me redirection is occured
    Please post response for OnClick request
  3. #3
    6 requests ❘ 2.2 KB transferred
    Test36.aspx/T 20 ms
    0 ms
    ext.axd?v=0/extjs/ext-all-debug-js 22 ms
    46 ms
    ext.axd?v=0/extjs/resources/ext_theme_classic/ext-theme-classic-all-debug-embedded-css 26 ms
    2 ms
    ext.axd?v=0/extnet/extnet-all-debug-js 23 ms
    2 ms
    ext.axd?v=0/extnet/resources/css/extnet-all-embedded-debug-css 26 ms
    1 ms
    Test36.aspx/T 95 ms
    148 ms





    Headers
    Preview
    Response
    Cookies
    Timing




    • Request URL:
      /T/Test36.aspx
    • Request Method:
      POST
    • Status Code:

      200 OK
    • Request Headersview source
      • Accept:
        */*
      • Accept-Encoding:
        gzip,deflate,sdch
      • Accept-Language:
        en-US,en;q=0.8
      • Connection:
        keep-alive
      • Content-Length:
        384
      • Content-Type:
        application/x-www-form-urlencoded; charset=UTF-8
      • Cookie:
        LifeKey=k2AcfDJPckWNxBm_oYgqFg; fbm_205072292837509=base_domain=.scenecalendar.web ; MCF=Zip=00000; .ASPXAUTH=785D8A66E5D692A2CB7EE117CD27CA525DE91800 0BAD7001A476566CFAABEF538260670BD5D4D13B5EE8070EA6 7AB3E3BA604DE8CFD714F7A86C9E5B902BF8914A8F74DD3BB4 4A4AF8DED178B8BB8E6F09C9922B; DayKey=jYueFpJnzEqbYpRRerO4EQ; fb=chk=1; ASP.NET_SessionId=kqcdzn40120rcpfe1mruokm5; LOCAL=tzo=-7; __utma=110182919.266780223.1372380832.1381656639.1 381661201.368; __utmb=110182919.1.10.1381661201; __utmc=110182919; __utmz=110182919.1372380832.1.1.utmcsr=(direct)|ut mccn=(direct)|utmcmd=(none)
      • DNT:
        1
      • User-Agent:
        Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
      • X-Ext.Net:
        delta=true
      • X-Requested-With:
        XMLHttpRequest

    • Form Dataview sourceview URL encoded
      • __EVENTTARGET:
        ResourceManager1
      • __EVENTARGUMENT:
        Btn|event|Click
      • __VIEWSTATE:
        HLOjp4PbbaOy29J+IW+gjHM8ncd7pZAlxz8uGDMqzNifS8tiKZ nl2FCPVanHdUyBRHImE8pXKMN3Ls9iKD0j61xNVZ4JVe/iURW1TQZkDyIHLSDc7akwmTg+0FAuqGfPwj3wazgq/XZIZB5UXi2+IRBrNwU=
      • __EVENTVALIDATION:
        ISbfqEQM2br9DEWOAqIY5SPkwASHVE52EcN3shLJo8IhGguF+C i3g9XGDPrhx8kI2zgylI3ryk73l2rn4ZCSKPRThwUXTyZpx/ZJVeRDfo0PvtoI

    • Response Headersview source
      • Cache-Control:
        private
      • Content-Encoding:
        gzip
      • Content-Length:
        48
      • Content-Type:
        text/html; charset=utf-8
      • Date:
        Sun, 13 Oct 2013 10:49:20 GMT
      • Location:
        /T/Test35.aspx
      • Server:
        Microsoft-IIS/8.0
      • X-AspNet-Version:
        4.0.30319
      • X-Powered-By:
        ASP.NET
      • X-SourceFiles:
        =?UTF-8?B?QzpcVXNlcnNcTWljaGFlbFxEb2N1bWVudHNcdmlzdWFsIH N0dWRpbyAyMDEyXFByb2plY3RzXHd3dy5zY2VuZWNhbGVuZGFy LndlYlxUXFRlc3QzNi5hc3B4?=



    Reproduced in IE, Chrome, FF. Running under VS 2012 in debugger. Behavior is new. Rebooted to make sure web server instance wasn't damaged. Preview shows no contents beyond the header.
    Attached Thumbnails Click image for larger version. 

Name:	test36.png 
Views:	15 
Size:	46.2 KB 
ID:	7035  
    Last edited by michaeld; Oct 13, 2013 at 10:57 AM.
  4. #4
    Thank you.

    Could you, please, also post a response's text?
  5. #5
    Maybe I wasn't clear but preview of response content text is entirely empty and consistently reproducible. Strange but true.
    Last edited by michaeld; Oct 14, 2013 at 1:06 PM.
  6. #6
    Are you testing in your real project? If so, could you create a simple empty one and re-test it?

    Also, this
    Microsoft-IIS/8.0
    Is it reproducible with any other server?
  7. #7
    Hello!

    I couldn't reproduce with our trunk too. Was trying the sample below:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
     
    <script runat="server">
        protected void Page_Load( object sender, EventArgs e ) {
        }
        public void OnClick( object sender, DirectEventArgs e ) {
            //X.Msg.Alert( "Test", "Test" ).Show();
            Context.Response.Redirect("http://ext.net");
        }
    </script>
     
     
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Test36</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" ViewStateMode="Enabled" ScriptMode="Debug" SourceFormatting="true" />
            <ext:Viewport ID="vp" runat="server">
                <Items>
                    <ext:Button ID="Btn" runat="server" Text="Redirect">
                    <DirectEvents>
                        <Click OnEvent="OnClick" >
                            <Confirmation ConfirmRequest="true" Message="Are you sure?" Title="Confirm" />
                        </Click>
                    </DirectEvents>
                    </ext:Button>
                </Items>
            <Items>
            </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
  8. #8
    Well I can't test with a non IIS8 server anymore. I've upgraded my production and VS environments this year. I can assure you, though, that this was working after I did and only recently became a problem when I started end-to-end testing again. I can't tell you exactly when it broke though, and the evidence is pointing to changes I may have made.

    I'll test outside my project and see. It is possible that recent changes I made to my HttpModule or using Context.Response.Filter to support manual gzipping pages. I'll look into those possibilities as well.
  9. #9
    Alright, you're off the hook. It was the Context.Response.Filter. Thank you for bearing with me. I couldn't be sure what recent changes might have caused it.

Similar Threads

  1. Replies: 2
    Last Post: Jun 11, 2013, 5:35 AM
  2. Replies: 13
    Last Post: Jan 17, 2013, 5:27 AM
  3. [CLOSED] Differences between X.Redirect and Response.Redirect
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 10, 2012, 4:29 PM
  4. Labels no longer showing
    By jskibo in forum Bugs
    Replies: 2
    Last Post: Apr 12, 2009, 9:36 PM
  5. [FIXED] [V0.6] .FindControl no longer required
    By geoffrey.mcgill in forum Bugs
    Replies: 0
    Last Post: Feb 12, 2008, 6:49 PM

Posting Permissions