Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 19th, 2010, 09:06 AM
Registered User
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default HttpContext.current.session is null in app_code/.cs file


1. SetSession.aspx page sets value for a session variable and redirects to default.aspx page.
2. Default.aspx page tries to create an object of class in app_code\common.cs file.
3. In app_code\Common.cs file, I am trying to access the session variable set in step1 using HttpContext.Current.Session object.

but step 3 gives error that object reference not set to an instance...bla bla..

I surft abt it on net, and seems to be problem with asp.net framework.

Any workaround??

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about HttpContext.Current.Session barakros BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 6th, 2010 10:23 AM
Calculator.cs not recognized in App_Code netwebb BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 January 21st, 2010 06:41 PM
Httpcontext.Current doesn't work with NUnit myself.panku BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 0 January 20th, 2010 08:53 AM
question about App_Code/ConfigSection.cs Jyothi_23 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 27th, 2009 11:08 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.