Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 4th, 2009, 03:00 PM
Registered User
 
Join Date: Jun 2007
Location: La Chorrera, Panama, Panama.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default object reference not set to an instance of an object

Hi

object reference not set to an instance of an object

I get this error after a time of using the web application on the server. I restart the IIS and the problem is solved, but again after a time the same error.

anyone have any idea about the cause of this error?

I'm using Class, singleton class
Framework 3.5, Windows Server 2003

Thanks
  #2 (permalink)  
Old December 4th, 2009, 03:21 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi..

Somebody, somehow, is closing the object, so you lost it..

You will have to log all the things that happens on the object, specially the point where it gets closed, so you can know who close it...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
  #3 (permalink)  
Old December 4th, 2009, 03:24 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Are you possibly storing someting in a session variable?
Is the "after some time" about 20 minutes?
You may need to test its existance before using and then reinstate when it is not there.
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
  #4 (permalink)  
Old December 4th, 2009, 03:27 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

of course if you are using hte app costantly, the session shouldn't be an issue
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
  #5 (permalink)  
Old December 4th, 2009, 03:34 PM
Registered User
 
Join Date: Jun 2007
Location: La Chorrera, Panama, Panama.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Exactly, I'm using the application costantly and when it happens all users who enter first time get the same message.
  #6 (permalink)  
Old December 14th, 2009, 03:45 AM
Friend of Wrox
 
Join Date: May 2006
Location: Northampton, United Kingdom.
Posts: 107
Thanks: 1
Thanked 8 Times in 7 Posts
Default

Which object does it relate to in your code?

Temporarily Set Debug = true to find out.

If you can't work out from the resultant error what is the the cause of the problem then please post the relevant code on this forum.


One thought, are you using a session variable to update a database field with the value of the session variable? If so then when the session variable expires (20 minutes usually) then the next time you reference it then it won't be available and then new users won't be able to read the value from the database.

Unfortunately without more information we are all going to be guessing at the solution.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object reference not set to an instance of an object. Michael YoeH ASP.NET 3.5 Professionals 5 August 23rd, 2009 02:07 PM
Object reference not set to an instance of an object. phuc2583 ASP.NET 3.5 Professionals 5 August 14th, 2009 10:56 AM
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 06:14 AM
Object reference not set to an instance of object iceman90289 ASP.NET 3.5 Basics 1 March 1st, 2009 05:13 AM
Object Reference not set to an instance of object srinivas_chakka ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 11:56 AM



All times are GMT -4. The time now is 09:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.