using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

  1. #1

    using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

    When trying to redirect to another web page by internal server call using
     Server.Transfer
    method the transfer will be done but this will show the warning window "The <code>web.config</code> file for this project is missing the required AjaxRequestModule." even if its configured correctly on the web.config.

    
    <script type="text/VB" runat="server">
    
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Server.Transfer("~/WebForm1.aspx",False)
    End Sub
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        
            <ext:ScriptManager ID="ScriptManager1" runat="server">
            </ext:ScriptManager>
        
    
     <asp:Button ID="Button2" runat="server" Text="Button" &#111;nclick="Button1_Click" />
        <ext:Button ID="Button1" AutoPostBack="true" runat="server" Text="Server Transfer"
            &#111;nclick="Button1_Click">
        </ext:Button>
        </form>
    </body>
    </html>
    No matter who issues the redirect a coolite control or a normal ASP.NET control the message will appear.


  2. #2

    RE: using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

    Hi,

    Yes, there is a problem. We use HttpFilter to modify response content. I found the following explanation why it is occurs. If we can fixed it we will notify you.

    See http://aspnetresources.com/articles/HttpFilters.aspx

    WHEN FILTERS DON'T WORK AT ALL
    Your filter won't be called at all if you call HttpApplication.CompleteRequest() one way or another. The pipeline will bypass your filter and send an unmodified response. The following methods do call HttpApplication.CompleteRequest():
    
    Server.Transfer()
    Response.End()
    Response.Redirect()
    The only one that doesn't call HttpApplication.CompleteRequest() isServer.Execute().
    
    "You lie!!!" No, see for yourselves:
    
    // --- HttpServerUtility.Transfer ---
    
    public void Transfer(string path, bool preserveForm)
    
    { 
    
     if (this._context == null)
    
        throw new HttpException(...);
    
    
    
     this.ExecuteInternal(path, null, preserveForm);
    
     this._context.Response.End();
    
    }
    
    // --- HttpServerUtility.Execute ---
    
    public void Execute(string path)
    
    { 
    
     this.ExecuteInternal(path, null, 1);
    
    }
    
    // --- HttpResponse.End ---
    
    public void End()
    
    { 
    
     ...
    
     this.Flush();
    
     this._ended = true;
    
     this._context.ApplicationInstance.CompleteRequest();
    
    } 
    
    // --- HttpResponse.Redirect ---
    
    public void Redirect(string url, bool endResponse)
    
    {
    
     ... 
    
     if (endResponse)
    
      this.End();
    
    } 
    
    If HttpApplication.CompleteRequest() is called during an event the ASP.NET HTTP pipeline will interrupt request processing once the event handling completes. If it's of any consolation it will fire the EndRequest event.
  3. #3

    RE: using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

    any updates on this?
  4. #4

    RE: using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

    We use an activex control and seem to have the same problem with the messagebox showing up

    The <code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: normal; font-style: normal; font-size: 12px; font-family: 'Courier New', Arial, sans-serif; vertical-align: baseline; ">web.config</code> file for this project is missing the required AjaxRequestModule." even if its configured correctly on the web.config.


    is there a way to turn this message off?


    Thanks
  5. #5

    RE: using Server.Transfer shows "The web.config file for this project is missing the required AjaxRequestModule" warning window

    Any update on this issue? Any walk around?

Similar Threads

  1. Replies: 0
    Last Post: May 24, 2012, 5:18 AM
  2. Replies: 0
    Last Post: May 10, 2012, 1:33 AM
  3. Replies: 2
    Last Post: Dec 19, 2011, 8:38 AM
  4. Replies: 16
    Last Post: May 30, 2010, 1:13 AM
  5. Replies: 5
    Last Post: Jul 06, 2009, 3:02 PM

Posting Permissions