Server.Transfer("myPage.aspx") : error executing child request

Discussion in 'ASP .Net' started by Tim C., Nov 26, 2003.

  1. Tim C.

    Tim C. Guest

    I get the error "error executing child request" when I
    use the Server.Transfer method to invoke a second aspx
    page. The following code is executed in a LinkButton click
    eventhandler on Page1.aspx.

    Server.Transfer("Page2.aspx",True)

    This code is virtually identical to the examples in
    chapter 4 (p. 196) of Microsoft's _Developing Web
    Applications_ 2nd edition, by Jeff Web. For what I'm
    hoping to accomplish, the Transfer method would work out
    better than Response.Redirect().

    The two ASPX pages in question are in the same folder. In
    the Page directive for Page1.aspx, EnableViewStateMac is
    set to "false".

    I don't understand why the error. Any help would be
    appreciated.

    Thanks
    Tim C., Nov 26, 2003
    #1
    1. Advertising

  2. Tim C.

    Tommy Guest

    You need to set "EnableViewStateMac" to "false" on Page2 instead of
    Page1.

    By default, "EnableViewStateMac" is "true", and when Page2 loads the
    viewstate from Page1, it detected that is is not generated from
    itself, and thus return an error.

    Tommy,

    "Tim C." <> wrote in message news:<04d901c3b45d$1fadfc00$>...
    > I get the error "error executing child request" when I
    > use the Server.Transfer method to invoke a second aspx
    > page. The following code is executed in a LinkButton click
    > eventhandler on Page1.aspx.
    >
    > Server.Transfer("Page2.aspx",True)
    >
    > This code is virtually identical to the examples in
    > chapter 4 (p. 196) of Microsoft's _Developing Web
    > Applications_ 2nd edition, by Jeff Web. For what I'm
    > hoping to accomplish, the Transfer method would work out
    > better than Response.Redirect().
    >
    > The two ASPX pages in question are in the same folder. In
    > the Page directive for Page1.aspx, EnableViewStateMac is
    > set to "false".
    >
    > I don't understand why the error. Any help would be
    > appreciated.
    >
    > Thanks
    Tommy, Nov 27, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John
    Replies:
    3
    Views:
    9,070
    Jacob Yang [MSFT]
    Nov 17, 2003
  2. diesel
    Replies:
    0
    Views:
    714
    diesel
    Apr 27, 2005
  3. =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==

    Error executing child request for MyPage.aspx.

    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==, May 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    8,695
    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==
    May 26, 2006
  4. Shridhar

    Error executing child request for error.aspx

    Shridhar, Apr 18, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    283
    Shridhar
    Apr 19, 2005
  5. Shridhar

    Error executing child request for error.aspx

    Shridhar, Apr 18, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    178
    Shridhar
    Apr 18, 2005
Loading...

Share This Page