C# Error Executing Child Request For Server.transfer
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Server.Transfer throws Error executing child request. How to resolve? up vote 22 down vote favorite 2 I have a HttpModule in C# 2.0 which handles exceptions thrown. Whenever the exception is thrown, an error page (aspx) with some querystring will be called. It is done through Server.Transfer(). But when the control tries to execute Server.Transfer(), the following exception is thrown: Error executing child request for [pagename].aspx. Whereas Request.Redirect() works fine. I tried setting EnableViewStateMac="false" in Page directive of the page to which request is transferred. Still problem persists. Here is the code I tried: string errorPage = "errorpage.aspx?id=" + someErrorId HttpContext.Current.Server.Transfer(errorPage,true); Any idea how this can be resolved? asp.net c#-2.0 server.transfer share|improve this question edited Aug 25 at 15:37 Stacked 1,4171642 asked Mar 2 '10 at 8:21 Amit 6,393184988 The issue is permission for IIS_IUSER. –PAWAN RAJ Shakya Apr 20 at 13:53 add a comment| 7 Answers 7 active oldest votes up vote 17 down vote accepted I found an alternative to Server.Transfer() I used HttpContext.Current.RewritePath("somefile.aspx"); This solved the issue. share|improve this answer edited Jun 10 '14 at 11:08 Owen Blacker 2,4891957 answered Mar 2 '10 at 9:48 Amit 6,393184988 6 How did you use it? The exception Error executing child request disappeared, but I get an empty page. –Serge S. Aug 20 '10 at 13:07 You have to do it in a IHttpModule. See msdn.microsoft.com/en-us/library/ms972974.aspx (unfortunately the article is way overlong, the actual concept is pretty simple). –mhenry1384 Sep 28 '11 at 20:24 If you have Server.Transfer available to you, you can probably just call Context.RewritePath, rather than needing to call HttpContext.Current to get an HttpContext object :) –Owen Blacker J
360 games PC games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/2361690/server-transfer-throws-error-executing-child-request-how-to-resolve Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/320439 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Web http://forums.asp.net/t/1489436.aspx?Server+Transfer+Error+executing+child+request+ Forms/Server.Transfer - "Error executing child request" Server.Transfer - "Error executing child request" [Answered]RSS 3 replies Last post Nov 10, 2009 11:26 PM by jitendramcu ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options c# error Advanced Search Related Links GuidanceSamplesVideos Reply chrisanderso... Member 3 Points 19 Posts Server.Transfer - "Error executing child request" Nov 05, 2009 11:29 AM|chrisanderson|LINK I'm receiving an error after a button click event fires a Server.Transfer. The error reads "Error executing child request for c# error executing SubmissionProcessing.aspx.: Exception of type 'System.Web.HttpUnhandledException' was thrown." ASP .Net 3.5. IIS 6 in Application Pool with several other applications - no web gardens or any other odd configurations The reason we are using Server.Transfer rather than Response.Redirect is that we have logic in the page we are transferring to shouldn't be in the navigation flow and we don't want the logic within that page executed twice. The stack trace is as follows: