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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Object reference not set to an instance of an object. ErrorObject reference not set to an instance of an object. Error
Previous
 
Next
New Post
1/4/2011 6:24 PM
 
Any ideas on the following error:

AssemblyVersion: 5.1.4
PortalID: 0
PortalName: ***
UserID: -1
UserName:
ActiveTabID: 125
ActiveTabName: Login
RawURL: /Home/Login.aspx?returnurl=%2fdefault.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.***.com/Home/Login.aspx?re...
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 79fb9771-88db-4c85-88c9-ccf9fd0fae88
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Common.Utilities.Config.GetPersistentCookieTimeout
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Common.Utilities.Config.GetPersistentCookieTimeout() at DotNetNuke.Entities.Users.UserController.UserLogin(Int32 portalId, UserInfo user, String PortalName, String IP, Boolean CreatePersistentCookie) at DotNetNuke.Modules.Admin.Authentication.Login.ValidateUser(UserInfo objUser, Boolean ignoreExpiring) at DotNetNuke.Modules.Admin.Authentication.Login.UserAuthenticated(Object sender, UserAuthenticatedEventArgs e) at DotNetNuke.Modules.Admin.Authentication.Login.cmdLogin_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: ***

Wisconsins DNN User Group: www.WIDNN.com
Visit my home page: www.HerbBenton.com
 
New Post
1/5/2011 11:16 AM
Accepted Answer 
Usually this error indicates that the addition of a <location> section in the web.config is preventing the DotNetNuke code from obtaing a value for the "timeout" attribute of the <system.web><authentication><forms> node. Later versions of DotNetNuke added defensive coding to account for this possibility. If you must include a <location> section (note that in some cases it accidentally gets added by Visual Studio or IIS configuration changes) in web.config, make sure that the <location> section contains a properly structured <system.web><authentication><forms> section with a timeout attribute and value on the <forms> node.

As I recall, you can also add a PersistentCookieTimeout node to the web.config <appSettings> section as follows:

<add key="PersistentCookieTimeout" value="3600" />

with your desired value. That will take precedence over the timeout attribute value in the <forms> node and prevent the code from trying to access that node's value.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/5/2011 11:26 AM
 
Thank you William!

I had thought the same thing, or along those lines as well. Currently, the web.config is sitting on a server that I don't have access to and was contacted by a client to help with the error. Unfortunately, the event log is sometimes a bit ambiguous and I wasn't sure about the error.

Is there another source (website) you referenced to discover the possible cause of this error, or was it based off of experience?

Thanks again!

Wisconsins DNN User Group: www.WIDNN.com
Visit my home page: www.HerbBenton.com
 
New Post
1/5/2011 2:48 PM
 
Based on experience and my recollection of this issue being a problem when a <location> section in the web.config contained an improperly structured or missing timeout attribute on the <authentication><forms> node, I'm pretty sure that is the source of this error. I also took a look at the source code for the GetPersistentCookieTimeout method to confirm that including a PersistentCookieTimeout setting in the <appSettings> node of web.config may be the solution if a <location> section must be included in the site's web.config.

Unfortunately, I can't think of anyway for you to know if that is the cause without access to the web.config file.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/5/2011 5:00 PM
 
I'm going to be with the client and their IT department tomorrow, I'll go over the config file with them then.

As for accessing the config file, I know the "Accidental GeeK" was working on a module for release with 5.6 that would allow for access to the config file from within the Host area  - I haven't worked with 5.6 yet so I'm not sure if it is there.

Here's a link to Joes blog post: http://tinyurl.com/24l5utj

Wisconsins DNN User Group: www.WIDNN.com
Visit my home page: www.HerbBenton.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Object reference not set to an instance of an object. ErrorObject reference not set to an instance of an object. Error


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