473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 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
Nov 19 '05 #1
0 1187

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel Groh | last post by:
I'm studying for C# Cert and i found a question about Context.Handler and i didn't understand. Could someone please explain me when and how do i use ? I'd like to make webapplication here for...
2
by: Magdelin | last post by:
I am trying to implement the front controller web presentation design pattern proposed by MS at the following link: http://msdn.microsoft.com/practices/type/patterns/enterpris...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
2
by: David Berman | last post by:
It seems that my site is losing session information when using Server.Transfer. I have a page called PictureGallery.aspx. It takes an argument which is an index id, so it would look like...
0
by: aaa | last post by:
I am using: Server.Transfer("Main.aspx") and also: MyPopUp fp = (MyPopUp)Context.Handler; the data transfers over fine but after it transfers the PopUp becomes the Main.aspx page. Is there any...
0
by: =?Utf-8?B?c2VndWU=?= | last post by:
When I use server.transfer to transfer properties between two asp.net pages in a third party .NET 2.0 project, I can’t extend one form to another by having the original page seen as part of the...
3
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Note: My apologies for repeating this post from last week, but my nospam alias and profile account were incorrect. I think I have fixed this, so hopefully this post will trigger MS into a response...
13
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
This is a follow-up to my post "Silverlight video doesn't work when file is streamed from handler in ASP.net" at...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.