SharePoint Error Delete Site WebDeleted.aspx File Not Found
We had severalĀ users reporting an error when deleting a SharePoint team site. The error appears as a “File Not Found.” on the WebDeleted.aspx layout page along with a stack trace. It appears that the problem stems from our custom master page. For our implementation we use a custom HttpModule that redirects incoming requests for a master page to virtualized custom master pages that we maintain.
The WebDeleted.aspx page references the simple.master page which we redirect to our customized application master page. Apparently this results in the page trying to load in elements that are out of context for it. The solution was to stop redirecting simple.master and instead route it back to the SharePoint out of the box simple.master.
3 Comments
Comments RSS
TrackBack Identifier URI
Leave a comment
I am running into the same problem. How did you get your custom branding accomplished without hardcoding these changes into the base default simple.master file?
Thank you.
Kay
Comment by Kay on November 4, 2010 5:53 pm
Hi Kay, we left any page using simple.master unbranded. Most pages using simple.master are restricted to the site administrators, so users typically will never see those pages (like a confirmation page that a site has been deleted).
Comment by richard on November 10, 2010 3:56 am
When receiving the File not found error, it is important to look at the stack trace carefully. It gives clues as to what the problem is. It would be nice if it indicated what the actual problem was, but this is SharePoint. If the stack trace indicates that it’s failing when trying to open a SPSite/SPWeb then there might be controls on your custom simple.master page that can’t render. They can’t render because they assume that the site/web still exist, and then try to get a reference to it. Take a look at how the url is structured, http://mydomain/sitename/_layouts/webdeleted.aspx. The virtual directory, _layouts, is getting accessed by a site that doesn’t exist anymore. This is why the out of the box webdeleted page doesn’t have controls on it that reference the current site. Take a look at the code for the simple.master and the webdeleted.aspx file. Everything in them is either static or non-site specific. You can test this very easy to see if this is your problem. Create a new site, then in the browser type http://mydomain/newsite/_layouts/webdeleted.aspx. This will not delete the site, but it will display a deleted confirmation page. If the confirmation page renders without the file not found error, then this is most likely the issue. To fix this, go into the custom simple.master and remove anything that is site specific. For example site actions buttons or access to lists in the current context. Happy coding!
Comment by Dennis Flagg on April 12, 2011 5:40 am