J
John Murray
Am porting ASP.NET code from 2.0 beta 2 to the RTM for 2.0. In a
handler, I am doing a simple Transfer (with the code below) which
results in a NullReferenceException (stack trace below as well.)
As this was previously working, I have to assume that something has
change in the HttpServerUtility ... is anyone else having this problem,
and if so, what did you do to work around it?
Original Code:
================
public void ProcessRequest(HttpContext context)
{
context.Server.Transfer("~/Default.aspx", false);
}
Stack Trace
============
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.HttpServerUtility.Execute(String path, TextWriter writer,
Boolean preserveForm) +229
System.Web.HttpServerUtility.Transfer(String path, Boolean
preserveForm) +53
Shadows.Handlers.HomeTransferHandler.ProcessRequest(HttpContext
context) in
c:\pluck\shadows\trunk\website\shadows\App_Code\Handlers\HomeTransferHandler.cs:22
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+317
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +65
handler, I am doing a simple Transfer (with the code below) which
results in a NullReferenceException (stack trace below as well.)
As this was previously working, I have to assume that something has
change in the HttpServerUtility ... is anyone else having this problem,
and if so, what did you do to work around it?
Original Code:
================
public void ProcessRequest(HttpContext context)
{
context.Server.Transfer("~/Default.aspx", false);
}
Stack Trace
============
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.HttpServerUtility.Execute(String path, TextWriter writer,
Boolean preserveForm) +229
System.Web.HttpServerUtility.Transfer(String path, Boolean
preserveForm) +53
Shadows.Handlers.HomeTransferHandler.ProcessRequest(HttpContext
context) in
c:\pluck\shadows\trunk\website\shadows\App_Code\Handlers\HomeTransferHandler.cs:22
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+317
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +65