Stack Overflow error after migrating from 1.1 to 2.0 framework

I'm using VS 2008, C# and working on an application with which I am still pretty unfamiliar.  However, the issue I'm having looks very straightforward.  I'm getting a stack overflow exception from the following overridden method.  Nothing has changed other than the attempt to upgrade the application.

 //code follows

public override Page Page

{

 

get

{

if (Context.Handler is Page)

return (Page)Context.Handler;

else

return null;

}

//End code

 Anyone have any help on this?

thx

0
rkincaid
4/3/2009 3:29:15 PM
asp.net.migrating-from-1.x-2.0 1016 articles. 0 followers. Follow

3 Replies
760 Views

Similar Articles

[PageSpeed] 52

 Any chance you can provide the full stack trace from the exception?

Edit: The reason I ask is because using that simple code snippet, I am unable to reproduce the issue.


Cheers,
       Kevin Jones


0
vcsjones
4/4/2009 11:32:48 PM

I'd love to provide the full stack trace, but the only thing I can get is from the stack window, and the only thing in the window is the method call that is erring.  The only message I get in the Call Stack window is:

MyNamespace.MyClass.dll!MyNamespace.MyClass.Page.get() Line 271 + 0x8 bytes

[External Code]

 This combination is repeated a number of times in the call stack window.  When I attempt to step through the call, the focus returns immediately to the "if(this.Context.Handler is Page) line.

Thanks!

 One additional note - is it possible that the type comparison is recursively calling the page property?  If so, and assuming I need that context.Handler set, what would be the work around?

0
rkincaid
4/7/2009 1:53:46 PM

Ok, update w/ good news:

 I changed the call from Context.Handler to System.Web.HttpContext.Current.Handler.  My working theory is that the Context.Handler was recursively calling the overridden Page property where it was defined making for an infinite loop with the very expected result of a stack overflow error. 

To me, the confusing part is why this change would be necessary, why have I not found other folks with the same issue.  If anyone can shed some light on this, I'd like to read it and file it away.

0
rkincaid
4/8/2009 6:38:16 PM
Reply:

Similar Artilces:

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

enigmail-1.0.1 for TB-3.0.x and enigmail-1.1.2 for TB-3.1.x available
Hi, enigmail-1.0.1 (TB-3.0.x) and enigmail-1.1.2 (TB-3.1.x) are available at http://enigmail.mozdev.org. Note for Seamonkey-2.0.x you can download and install enigmail-1.0.1. Have fun, Walter ...

Automated cleanup tool to remove the .NET Framework 1.0, 1.1, 2.0, 3.0 and 3.5
"I have posted an updated version of the .NET Framework cleanup tool that now contains support for automatically cleaning up the .NET Framework 1.0, the .NET Framework 1.1, the .NET Framework 2.0, the ..NET Framework 3.0 and the .NET Framework 3.5. This tool automates the manual cleanup steps for the .NET Framework 2.0 that I posted a while ago. These steps have helped solve most of the known .NET Framework 2.0 beta uninstall issues that I know of. In addition, the tool can be useful to return your system to a known (relatively clean) state in case you run into any .NET Framew...

Migration from .NET 1.1 to .NET 2.0
Hi All, Well i hoped that the migrating went smoother then is does so far. I had a few problem which i could fix with blogs from other developers, but i didn't find a good solution for this problem. Somehow i get the following error: "Make sure that the class defined in this code file matches the 'Inherits' attribute, and that it extends the correct base class" Well i worked very good before the migration. Some advise would be very welcome! Regards,Dennis van de Laarhttp://dennisv.net/Don't forget to mark the most helpful reply/replies as Answer. Maybe this post will hel...

From 2.1.2 to 3.1 or 2.1.2 to 3.0.13 to 3.1
I'm checking back in after being away for a couple of months and I missed the 3.1 release. I can't seem to find any info on what's new in 3.1 and also what the upgrade path should be. So, is the recommended path for upgrading from v 2.1.2 to go directly to 3.1 or do I need to go to 3.0.13 first? Are there any big issues in 3.1 that make it a "gotta have it" version?I did a couple of 2.1.2 to 3.0.12 upgrades but haven't upgraded to or tested 3.1 yet. I have one 2.1.2 site that is commercial and I need it to be down as little time as possible. It also has a lot of third party modules...

.NET Framework 1.0 and 1.1 #2
I develop apps on a Windows server running Framework 1.1. Initially we had 1.0 installed on our local computers and was later on upgraded to 1.1. When I try to build a component that was made for 1.1, it gives me an error saying that I am using v1.0. When I go to Help -> About in Visual Studio, I see .NET 1.0 listed When I go to Add/Remove programs, I see both .NET 1.0 and .NET 1.1 listed Why is it using 1.0 when 1.1 is installed? Please help. Have you upgraded your version of Visual Studio to VS 2003? You'll need that version to build for Framework 1.1JimMS MVP ASP.NET [VC+...

Migration from .net 1.1 to .net 2.0 and deployed in server: error "Server Application Unavilable"
Hi, I have upgraded one .net 1.1 application to .net 2.0. though locally the application is running fine, when deployed in the server it is giving the following error : Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused thi...

Migrate DataGrid .NEt 1.1 to .NEt 2.0
Hi I has just convert my ASP.NET web application from .NET 1.1 to .NEt 2.0 so far there is no problem but my datagrid seems to be acting really weird my datagrid has 3 columns and have paging enabled. When there is one/two row of data. The paging(which shows us the number of page) seems to have a column span of 1)  If i click on the second row of data.... the paging will have the column span of 3 This does not happen if there is more than 2 data   please go to the link for better clarification http://yingleekit.multiply.com/photos/album/1/work#1 http://ying...

updated 1.2.2 to 2.0.1 but still shows 1.2.2
I just reinstalled the SBS 6 with the NW6 SP3 Overly cd and i put web access, iprint, dhcp/dns, naas on the initial install. I then proceded to upgrade edir to 8.7.1 ( i updated jvm and the other stuff that 8.7.1 required first) and everything went great. I then udated imanager from 1.2.2. to 2.0.1 and the install went as expected no errors or anything. Here is the problem when i surf to iManager with internet exploder 6 it shows me i am using 1.2.2. I read the instructions and they talk about some migrating but the direction don't match imanager 1.2.2 (i assume they are reffe...

Framework migration from 1.1 to 2.0
Hi Members, I'm really confused about this and need your help to figure it out. I got web application compiled in Visual Studio 2003 1.1 framework. I need to get this migrated to 2.0 Frame asap with less effort. Do I have to complie this application in VS2005 to get it migrated to 2.0 frame or is there any way that I could just simply complie this solution in 2.0 I came to know from others that for higher Framework migration we don't actually need to get used to Visual Studio 2005. With the source code still in Visual Stidio 2003 can we migrate solution to 2.0 Fr...

Migration from framework 1.1 to 2.0 : Do it or not ???
Hello all ! I'm working on a huge asp.net project that uses framework 1.1. The question i'm asking : Migrate to 2.0 or not ??? I compiled the project with visual studio 2005 and they are lot of errors. I would like to have your opinions on that subject please. Thanx a lot guys ! When you first opened your 1.1 project in 2005, did it get converted?  For your 1.1 project, is it remote or local? I have taken some of my 1.1 projects and opened them as a website/file system project, ignoring the .sln and .csproj/.vbproj files.  For the most part, I generally haven't h...

Enigmail-1.0.1 for OS/2 TB-3.0.x and SM-2.0.x available at enigmail.mozdev.org
I'm glad to announce that after a while, where some smaller quirks had to be ironed out, enigmail-1.0.1 can be downloaded from enigmail.mozdev.org. Thanks to the developers for the upload to their site. Enigmail-1.0.1 works only with Thunderbird-3.0.x and Seamonkey-2.0.x. If you still use TB-2.0.0.x or SM-1.1.x you should stick to enigmail-0.95.7. In case of trouble please post to this list here. Have Fun, Walter ...

Migrating .NET 1.1 to .NET 2.0/3.5
We have many of our application running in .NET 1.1, and plannig to migrate all one-by-one, i know there will be a big challenge for this activity, What we are planning is not to migrate all in one shot, After migrating one application we will give for some selective users testing once we feel it is OK, do the next. What is best way of doing this thing? Any links, thrid party tools, since opening this in VWD 2005, it is converting the application but many errors are popuping up. Any reference would be highly appreciated, thanks in advance. Hi, Please follow the steps mentioned in this l...

Web resources about - Stack Overflow error after migrating from 1.1 to 2.0 framework - asp.net.migrating-from-1.x-2.0

Thunderclap Migrating From Twitter to Facebook
Thunderclap, a mass-messaging service that gained popularity on Twitter, has set its sights on Facebook . Twitter recently booted Thunderclap ...

Facebook Migrating Unofficial Page Fans to Official Pages at Brand Owner’s Request
Rupesh Mandal is such an avid fan of the Opera Mini web browser that he set up a Page on Facebook totally devoted to celebrating it, and then ...

Teens Migrating From Facebook To Comments Section Of Slow-Motion Deer Video - YouTube
Subscribe to The Onion on YouTube: http://bit.ly/xzrBUA Trendwatchers say more and more teens are leaving Facebook and Twitter in favor of the ...

UAE is the global leader in attracting migrating professionals, study finds
... with 28 per cent, was the leading source of professionals, according to the LinkedIn study. The UAE is the global leader in attracting migrating ...

Record Numbers of New Zealanders Migrating to Australia
Acting on impulse: why the Kiwis keep coming ... and coming and coming

The krilling season: Whales keep tourists migrating south
Earlybird whale watchers in Eden have been rewarded with astounding acrobatic displays in the bay.

Migrating Swans were bound for glory, says great
Migrating Swans were bound for glory, says great

Researchers say Irukandji jellyfish migrating further south along Qld coast
Researchers say climate change could be altering the migration patterns of the dangerous Irukandji jellyfish along Qld's east coast.

Apple chip supplier TSMC announces record profits, migrating to more advanced technology
... Company , iPhone , and iPad continue reading at 9to5Mac . What do you think? Discuss "Apple chip supplier TSMC announces record profits, migrating ...

More eBay Merchants Migrating to Amazon in Search of Sales Growth
EBay's once-loyal merchants are moving more of their business to Amazon, saying they get more for their money by selling merchandise via the ...

Resources last updated: 12/15/2015 5:49:08 AM