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...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuto Auth causes "User Accounts" to fail to loadAuto Auth causes "User Accounts" to fail to load
Previous
 
Next
New Post
7/18/2006 5:02 AM
 

I have setup DNN with auto auth for our domain and found that the auto authentication sometime does not collect the correct details and in somecases if the domain user account does not have firstname or lastname set, this causes the "User Accounts" (under Admin) to fail to load with the following error:

(I have tested this in DNN3 and DNN4, and believe that it's the datagrid/or other control that displays the users in the Users.ascx)

ModuleId: 357
ModuleDefId: 15
FriendlyName: User Accounts
ModuleControlSource: Admin/Users/Users.ascx
AssemblyVersion: 04.03.02
Method: DotNetNuke.UI.WebControls.TextColumnTemplate.GetValue
FileName:
FileLineNumber: 0
FileColumnNumber: 0
PortalID: 0
PortalName: Portal Name
UserID: 251
UserName: domain\useraccount
ActiveTabID: 42
ActiveTabName: User Accounts
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://sitename/Admin/UserAccounts/tabid/42/Default.aspx
ExceptionGUID: 7e36f539-da34-4e0d-aed4-496aae1cf83f
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
InnerException: Object reference not set to an instance of an object.
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.WebControls.TextColumnTemplate.GetValue(DataGridItem container) at DotNetNuke.UI.WebControls.TextColumnTemplate.Item_DataBinding(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at DotNetNuke.Modules.Admin.Users.UserAccounts.BindData(String SearchText, String SearchField) in D:\webroots\sitename\Admin\Users\Users.ascx.vb:line 211 at DotNetNuke.Modules.Admin.Users.UserAccounts.Page_Load(Object sender, EventArgs e) in D:\webroots\sitename\Admin\Users\Users.ascx.vb:line 495 --- End of inner exception stack trace ---
StackTrace:
Source:
Server Name: SERVERNAME

My initial fix for this was to manually edit the dbo.Users table, and add in the fields required, since then I have updated the dbo.AddUsers to the following:

set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[AddUser]

@PortalID int,

@Username nvarchar(100),

@FirstName nvarchar(50),

@LastName nvarchar(50),

@AffiliateId int,

@IsSuperUser bit,

@Email nvarchar(256),

@DisplayName nvarchar(100),

@UpdatePassword bit,

@Authorised bit

AS

DECLARE @UserID int

SELECT @UserID = UserID

FROM Users

WHERE Username = @Username

 

-- BEGIN -- Added by Popcorn69

-- This modification stops the Userlist failing when loading DNN

If @FirstName = ''

BEGIN

SELECT @FirstName = @Username

END

If @LastName = ''

BEGIN

SELECT @LastName = '-'

END

IF @DisplayName = ''

BEGIN

SELECT @DisplayName = @Username

END

-- END -- Added by Popcorn69

IF @UserID is null

BEGIN

INSERT INTO Users (

Username,

FirstName,

LastName,

AffiliateId,

IsSuperUser,

Email,

DisplayName,

UpdatePassword

)

VALUES (

@Username,

@FirstName,

@LastName,

@AffiliateId,

@IsSuperUser,

@Email,

@DisplayName,

@UpdatePassword

)

SELECT @UserID = SCOPE_IDENTITY()

END

IF @IsSuperUser = 0

BEGIN

IF not exists ( SELECT 1 FROM UserPortals WHERE UserID = @UserID AND PortalID = @PortalID )

BEGIN

INSERT INTO UserPortals (

UserID,

PortalID,

Authorised

)

VALUES (

@UserID,

@PortalID,

@Authorised

)

END

END

SELECT @UserID

I hope someone finds this usefull.

 

 
New Post
7/20/2006 9:18 AM
 

Ok, thank you for this post.

I've resolved ;)

 

--
Gianluca Cannalire

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuto Auth causes "User Accounts" to fail to loadAuto Auth causes "User Accounts" to fail to load


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