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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...EventLog: GetOrdinal ExceptionsEventLog: GetOrdinal Exceptions
Previous
 
Next
New Post
12/7/2009 3:13 AM
 

 My EventLog on some DNN 5.1.4 installs is being flooded with exeptions like the one below.

What is causing this?

Also when I check the number of log entries in the database using:

SELECT COUNT(*)FROM EventLog

Sometimes the COUNT actually decreases? is this being cleaned up automatically?

Thanks!
 
  4-12-2009 9:11:33   General Exception   host     AssemblyVersion: 5.1.4; PortalID: 11; PortalName ...
AssemblyVersion: 5.1.4
PortalID: 11
PortalName: Name
UserID: 1
UserName: host
ActiveTabID: 268
ActiveTabName: Home
RawURL: /Home.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrerhttp://www.domain.com/Default.aspx?ctl=login
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; Media Center PC 5.0; .NET CLR 3.0.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 0bb1f27b-bc47-4d5e-95c7-580236791095
InnerException: CreatedByUserID
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Data.ProviderBase.FieldNameLookup.GetOrdinal
StackTrace
Message: System.IndexOutOfRangeException: CreatedByUserID at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) at System.Data.SqlClient.SqlDataReader.get_Item(String name) at DotNetNuke.Entities.BaseEntityInfo.FillInternal(IDataReader dr) at DotNetNuke.Security.Roles.RoleInfo.Fill(IDataReader dr) at DotNetNuke.Common.Utilities.CBO.FillObjectFromReader(Object objObject, IDataReader dr)
Source
Server Name:

 

 

 
New Post
12/7/2009 3:37 AM
 

there seems to be a problem to login due to the user not being able to retrieved. are you able to identify, which user tried to login?

Eventlog is cleared by "purgeEventlog" scheduled job, to fit into duration and max number of entries provided in Host Settings and Site Settings.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/7/2009 7:07 AM
 

The GetOrdinal problem is caused by a datareader not being properly closed in a section of code.  This error normally only shows up under extremely heavy load and is a known issue with ADO.Net as it returns data from the wrong datareader.  The hard part to track down is that the error is likely completely unrelated to the page on which the error occurs.

Do you have many 3rd party modules installed on your system?


Joe Brinkman
DNN Corp.
 
New Post
12/7/2009 9:59 AM
 

@Joe,

This reply seems to suggest it's an issue with ADO.Net.  Having just read a four year long thread on this (http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/74a5db87-c63f-4386-b317-e848dedb2cd9/) I'm on the side of saying it's (mainly) bad customer written code.  There does seem to be at least one version of the enterprise lib that had the same problem. 

The most prevalent mistake seems to be static (C#) Shared (VB) SqlConnection objects.

The thread does support Joe's statement that the page hitting the exception may be the innocent victim of a bug elsewhere.


Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
3/18/2011 1:29 PM
 
Joe Brinkman wrote:

The GetOrdinal problem is caused by a datareader not being properly closed in a section of code.  This error normally only shows up under extremely heavy load and is a known issue with ADO.Net as it returns data from the wrong datareader. 

 
I think there is also another explanation. I can reproduce this problem in a local site with not heavy load at all, browsing a single page, just me.
This is the problem (I think):
Let's say you have something like this in any 'controller' Core or 3rd party class:

Public Function GetUsersWhatever(ByVal PortalId As Integer, ....) As List(Of UserInfo)
   Return CBO.FillCollection(Of UserInfo)(DirectCast(DataProvider.Instance().GetUsersWhatever(PortalId, ....), IDataReader))
End Function

"GetUsersWhatever" stored procedure is not including every property of the UserInfo class. This is legitimate, right?
Let's say some of the 'missing' properties on the datareader are one or all of: CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate

These properties are not on UserInfo class, they are on BaseEntityInfo (UserInfo inherits from it).
In BaseEntityInfo class code, I read (5.6.1 source code, and I bet it's the same code in all the previous version where these properties were introduced too):
Protected Overridable Sub FillInternal(ByVal dr As System.Data.IDataReader)
   _CreatedByUserID = Null.SetNullInteger(dr("CreatedByUserID"))
   _CreatedOnDate = Null.SetNullDateTime(dr("CreatedOnDate"))
   _LastModifiedByUserID = Null.SetNullInteger(dr("LastModifiedByUserID"))
   _LastModifiedOnDate = Null.SetNullDateTime(dr("LastModifiedOnDate"))
End Sub

Which means that by default (unless FillInternal is overridden somewhere) these fields are expected, and if they are not found this will throw an exception (the one a lot of people see flooding their Event Logs).
It is OK for this code to assume the 'dr' will have these properties for sure? I think it should be changed, and do not have that for granted, because in fact, it's not always the case.

Thoughts?

Thanks,
Horacio.-






 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...EventLog: GetOrdinal ExceptionsEventLog: GetOrdinal Exceptions


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