© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
11 replies
Bunnies4Breakfst

❔ WPF System.ObjectDisposedException: 'Cannot access a closed Stream.'

I have a wpf application and when I navigate from Page A to page B then back to Page A, the xaml initializecomponent() throws the above error. The issue is.. I'm not using a stream reader/writer anywhere in this.
Below is the call stack

I feel like something somewhere is getting disposed and then I'm trying to use it but I'm not sure where to start to find this.
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Blazor Server: Cannot access a closed Stream
C#CC# / help
2y ago
ObjectDisposedException: Cannot access a closed Stream. I don't understand why it doesn't work.
C#CC# / help
2y ago
WPF login system
C#CC# / help
16mo ago