Hi. I have a problem regarding the SPWeb error ("Trying to use an SPWeb object that has been closed or disposed and is no longer valid"). I am a site administrator, and we keep gettin that problem on a few sites. After doing
some research on the net, they recommend everywhere to not dispose the SPWeb object, but we haven't made no code modifications, so we still have no clue as why this is happening.
We get the error when trying to access to the AllItems page of a list or document library. We noticed that this only happens when you select 'show navigation under current site' on Site Configuration > Exploration, and there are no other
sites created under the current one. Then, if you clic on some list on the 'All Site Content' page, it shows the SPWeb error message.
The easiest way to solve this was to create empty sites under the ones on which we wanted to choose that navigation configuration, and then hide them. It seems like having a site under itself helps to recover the reference to the SPWeb object.
I don't know if this is a bug, the masterpage or site templates are corrupted, or maybe it's just like this, and Sharepoint doesn't allows you to choose 'show navigation under current site' when there are no subsites under this one.
View Complete Post