 |
| 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 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
|
|
|
|

December 4th, 2009, 03:00 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

December 4th, 2009, 03:21 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
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.
================================================== =========
|
|

December 4th, 2009, 03:24 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
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
======================================
|
|

December 4th, 2009, 03:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
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
======================================
|
|

December 4th, 2009, 03:34 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Exactly, I'm using the application costantly and when it happens all users who enter first time get the same message.
|
|

December 14th, 2009, 03:45 AM
|
|
Friend of Wrox
|
|
Join Date: May 2006
Posts: 107
Thanks: 1
Thanked 8 Times in 7 Posts
|
|
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.
|
|
 |