Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > handler, using context.Server.Transfer

Reply
Thread Tools

handler, using context.Server.Transfer

 
 
John Murray
Guest
Posts: n/a
 
      11-08-2005
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.ProcessReques t(HttpContext
context) in
c:\pluck\shadows\trunk\website\shadows\App_Code\Ha ndlers\HomeTransferHandler.cs:22

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+317
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +65
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a Link Button to redirect to another page by using data from =?Utf-8?B?R1REcml2ZXI=?= ASP .Net 1 02-16-2005 07:04 PM
Error page using the Application_Error void dosnt work when using DIV for a please wait message s_erez@hotmail.com ASP .Net 2 12-24-2004 12:11 PM
no code in webform using vs.net, but in webform using notepad timmso ASP .Net 1 12-12-2003 04:30 PM
Using GetOleDbSchemaTable to get SQL Server Field Description - using pete ASP .Net 1 08-29-2003 10:50 AM
Re: MVP? Index error on nested element using System.xml but NOT using msxml??? William F. Robertson, Jr. ASP .Net 1 06-25-2003 08:08 PM



Advertisments