SharePoint 2010 Application Page Code Behind Throws Exception "Trying to use an SPWeb object that has been closed or disposed and is no longer valid."
This was the situation: I have a SharePoint Foundation 2010 project in VS2010. There I deploy some SharePoint lists with custom views an custom form pages. In one case I wanted to…