context.Server.Transfer

  • Thread starter Thread starter Mauricio
  • Start date Start date
M

Mauricio

Hi!

I´m using a custom handler with an ASP.NET application
using the Front Controller pattern.

But I´m experiementing some problems with the following
line of code:

context.Server.Transfer(url);

context is a HttpContext object and url is a string with
the target url.

When running the application, I obtain the following
error:

Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code

Exception Details: System.Web.HttpException: Error
executing child request for /logon.aspx


what can be the error????
 
Try

System.Web.HttpContext.Current.Server.Transfer(url);

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.

Hi!

I´m using a custom handler with an ASP.NET application
using the Front Controller pattern.

But I´m experiementing some problems with the following
line of code:

context.Server.Transfer(url);

context is a HttpContext object and url is a string with
the target url.

When running the application, I obtain the following
error:

Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code

Exception Details: System.Web.HttpException: Error
executing child request for /logon.aspx


what can be the error????
 
It doesn´t work. I have the same error.

Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.

Exception Details: System.Web.HttpException: Error
executing child request for default.aspx.

Source Error:


Line 22:
Line 23: // context.Server.Transfer
(url);
Line 24:
System.Web.HttpContext.Current.Server.Transfer
(url);
Line 25: }
Line 26: }

Stack Trace:


[HttpException (0x80004005): Error executing child
request for default.aspx.]
System.Web.HttpServerUtility.ExecuteInternal(String
path, TextWriter writer, Boolean preserveForm)
System.Web.HttpServerUtility.Transfer(String path,
Boolean preserveForm)
System.Web.HttpServerUtility.Transfer(String path)
Volvo.Evaluacion.Web.RedirectingCommand.Execute
(HttpContext context) in
c:\inetpub\wwwroot\volvoeval\redirectingcommand.cs:24
Volvo.Evaluacion.Web.Handler.ProcessRequest
(HttpContext context) in
c:\inetpub\wwwroot\volvoeval\handler.cs:14

System.Web.CallHandlerExecutionStep.System.Web.HttpApplica
tion+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously)


Version Information: Microsoft .NET Framework
Version:1.1.4322.557; ASP.NET Version:1.1.4322.557
 
Back
Top