handler, using context.Server.Transfer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Murray

    handler, using context.Server.Transfer

    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 NullReferenceEx ception (stack trace below as well.)

    As this was previously working, I have to assume that something has
    change in the HttpServerUtili ty ... 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
    ============
    [NullReferenceEx ception: Object reference not set to an instance of an
    object.]
    System.Web.Http ServerUtility.E xecute(String path, TextWriter writer,
    Boolean preserveForm) +229
    System.Web.Http ServerUtility.T ransfer(String path, Boolean
    preserveForm) +53
    Shadows.Handler s.HomeTransferH andler.ProcessR equest(HttpCont ext
    context) in
    c:\pluck\shadow s\trunk\website \shadows\App_Co de\Handlers\Hom eTransferHandle r.cs:22

    System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute()
    +317
    System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
    completedSynchr onously) +65
Working...