Skip to content

Fix disposed error from IPersonaBarContainer#6948

Merged
bdukes merged 1 commit intodnnsoftware:release/10.2.2from
bdukes:personabar-disposed
Jan 29, 2026
Merged

Fix disposed error from IPersonaBarContainer#6948
bdukes merged 1 commit intodnnsoftware:release/10.2.2from
bdukes:personabar-disposed

Conversation

@bdukes
Copy link
Copy Markdown
Contributor

@bdukes bdukes commented Jan 29, 2026

Summary

This PR attempts to resolve a reported exception while using the Persona Bar.

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at Dnn.PersonaBar.Library.Controllers.PersonaBarController.<GetMenu>b__8_0(MenuItem m)
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Dnn.PersonaBar.Library.Controllers.PersonaBarController.GetMenu(PortalSettings portalSettings, UserInfo user)

Copy link
Copy Markdown
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bdukes

Copy link
Copy Markdown
Contributor

@donker donker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@bdukes bdukes merged commit 03ee406 into dnnsoftware:release/10.2.2 Jan 29, 2026
3 checks passed
@bdukes bdukes deleted the personabar-disposed branch January 29, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: dnn 10.2.2.337 personabar not showing after clean build of DNN

3 participants