Wednesday, May 26, 2010

User Manager error when AD is configured

In one of my project, i encountered issue with User Manager when AD is configured. The error is as shown below

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]    
Sitecore.Security.UserProfile.get_State() +25  [TargetInvocationException: Exception has been thrown by the target of an invocation.]    
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0    
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71    
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350    
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29    
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) +53    
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +20    
ComponentArt.Web.UI.GridItem.FillValuesFromObject(Object oObject) +305    
ComponentArt.Web.UI.GridItem..ctor(Grid oGrid, Int32 iLevel, Object oObject) +138    
ComponentArt.Web.UI.Grid.LoadGridItems(GridItemCollection arItems, Object[] arObjects, Int32 iLevel) +81    
ComponentArt.Web.UI.Grid.DataBindToEnumerable(IEnumerable arList) +1228    ComponentArt.Web.UI.Grid.DataBind() +1039    
Sitecore.Web.UI.Grids.ComponentArtGridHandler`1.DataBind() +92    
Sitecore.Web.UI.Grids.ComponentArtGridHandler`1.InitializeGrid(Boolean dataBind) +516    
Sitecore.Web.UI.Grids.ComponentArtGridHandler`1..ctor(Grid grid, IGridSource`1 source, Boolean dataBind) +92   
Sitecore.Web.UI.Grids.ComponentArtGridHandler`1.Manage(Grid grid, IGridSource`1 source, Boolean dataBind) +94    
Sitecore.Shell.Applications.Security.UserManager.UserManager.OnLoad(EventArgs e) +126    
System.Web.UI.Control.LoadRecursive() +50    
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

However, this error is only happening in my dev environment and the issue seems to be when with the AD configuration. Sitecore threw an error when it tries to load user's state. The code below is the code that deal with this loading


and it is located in UserManager.aspx file which is located at

Website\sitecore\shell\Applications\Security\UserManager

So two solution will be "Edit the AD field configuration" or "Remove the code from the aspx" file

1 comment:

  1. Hi Steven,

    Thanks for all your posts.
    Recently I ran into a similar server error issue with our website setup with Sitecore.
    Off late there have been lot of server error received while accessing the website. Would like to mention here that the server errors are intermittent but very frequent.

    Below is the "Object reference not set" error and its stack trace -

    /E:\inetpub\wwwroot\txucom\Website\TMPRWEBW027504w3wp.exeIIS APPPOOL\DefaultAppPoolNullReferenceExceptionObject reference not set to an instance of an object.https://android.txu.com:443/login.aspx?AppVersion=1.2/login.aspx172.27.190.140FalseIIS APPPOOL\DefaultAppPool22IIS APPPOOL\DefaultAppPoolFalse at Sitecore.Security.Authentication.AuthenticationHelper.GetCurrentUser() at Sitecore.Security.Authentication.AuthenticationHelper.GetActiveUser() at Sitecore.Security.Authentication.AuthenticationProvider.GetActiveUser() at Sitecore.Pipelines.HttpRequest.UserResolver.Process(HttpRequestArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Nexus.Web.HttpModule. (Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Again, these are Sporadic as most of times users are able to log in. But still its a major impact to the business.

    Appreciate if you may help me with this one.

    thanks,
    Abhishek

    ReplyDelete