Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumProblem..Need help from the guruProblem..Need help from the guru's
Previous
 
Next
New Post
11/15/2006 10:38 AM
 
frankt wrote

Guys,

I'm still getting these errors and my users are starting to leave.  Any ideas on how to get this fixed or why it is occurring?  It occurs in different parts of the rendering process, from a control on a page to the entire forums page.  Always object reference not set to an instance of an object (I really hate that freakin error from .Net.  It's about as useful as "unknown error".

Anyone at all?  I need help..

Thanx in advance,

Frankt




Yea, I am getting similar problem too . . . the error messages are slightly different, but the type of problem is the same . . .

"DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object."

I posted my RFA (Request For Assistance) lat week, no response from anybody yet . . . I guess everyone drags those "freakin" errors too   :(

JC


 
New Post
11/15/2006 10:58 AM
 

Jennc

I think I've tracked down the problem.  You aren't using 1and1 hosting are you?  what host do you use?  Is your host using a very strict Code Access Security policy?

The problem is that the ForumConfig object is getting "lost".  It's returning NULL in a very random manner.  I noticed this object is cached in the datacache.  I'm not a vb guru (I'm a c# guru) but the pattern for some of the static classes in DNN don't look right to me.  I always follow this pattern for static classes in c# http://www.yoda.arachsys.com/csharp/singleton.html

The forum config object has both static members and instantiated members.   But the core of this object is loaded and member variables are set in the new operator.  For some reason, the object is getting wiped out (it is losing it's reference).  I'm made ALOT of changes to this module to try and fix this.  Even to the point of on every page load it will check to see if this class is there, and if it isn't, it reloads it.  I'm testing this new dll now to see if I get any more of these errors.  My problem is DEFINITELY related to the forum configuration object losing scope somehow.  So whenever a class in the forums module access a non-static property, the object is null and you get the dreaded object reference not set to an instance of an object.


Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
New Post
11/15/2006 2:13 PM
 

Ok...this problem has to do with worker process recycling in IIS 6.0.  My question is if the app is recycled, how does the forum.config get loaded again in between requests?   Anyone?

 

CRISPY,

You need to take a look at this article.  http://markitup.com/Posts/PostsByCategory.aspx?categoryId=601534f1-b1e9-49a6-8704-0b689a1dd4da

"Notice that in Steve's pattern a local variable is populated and then inserted into the Cache but that it is the variable that is returned from the method.  In my original code I was returning the value held in the Cache directly from the method.  As Steve notes in a recent email, on a busy site where you have sufficient load/memory pressure the code in my original pattern can cause inconsistent behavior because the item can actually be removed from the Cache in-between adding the item to the Cache and returning it at the end of the method."

Public Shared Function GetForumConfig(ByVal ModuleID As Integer) As Forum.Config

Dim strKey As String = FORUM_CONFIG_CACHE_KEY_PREFIX & ModuleID.ToString

If DataCache.GetCache(strKey) Is Nothing Then

Dim config As Forum.Config = New Forum.Config(ModuleID)

DataCache.SetCache(strKey, config)

End If

Return CType(DataCache.GetCache(strKey), Forum.Config)

End Function


Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
New Post
11/16/2006 10:05 AM
 
frankt wrote

Jennc

I think I've tracked down the problem.  You aren't using 1and1 hosting are you?  what host do you use?  Is your host using a very strict Code Access Security policy?

The problem is that the ForumConfig object is getting "lost".  It's returning NULL in a very random manner.  I noticed this object is cached in the datacache.  I'm not a vb guru (I'm a c# guru) but the pattern for some of the static classes in DNN don't look right to me.  I always follow this pattern for static classes in c# http://www.yoda.arachsys.com/csharp/singleton.html

The forum config object has both static members and instantiated members.   But the core of this object is loaded and member variables are set in the new operator.  For some reason, the object is getting wiped out (it is losing it's reference).  I'm made ALOT of changes to this module to try and fix this.  Even to the point of on every page load it will check to see if this class is there, and if it isn't, it reloads it.  I'm testing this new dll now to see if I get any more of these errors.  My problem is DEFINITELY related to the forum configuration object losing scope somehow.  So whenever a class in the forums module access a non-static property, the object is null and you get the dreaded object reference not set to an instance of an object.




Thanks for your reply, Frank!

Hummm . . . Crispy thinks that my problem comes from our using DNN 4.0.3 and that the Forum module is built for DNN 4.3.5.  Well, good luck with your endeavor and hope that you have yours working very soon.

JC


 
New Post
11/16/2006 6:29 PM
 

Frankt, I have refactored the caching code about two months ago just haven't released anything since then. Thanks for the informative link though.

 


Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumProblem..Need help from the guruProblem..Need help from the guru's


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out