context.Server.Transfer

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????
 
K

Kevin Spencer

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????
 
M

Mauricio

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top