SharePoint Products > SharePoint 2010 Forums > SharePoint 2010 - Using Visual Studio with SharePoint and other programming > SharePoint Site Collection (UserSolution) Soltuion will not delete.

Answered SharePoint Site Collection (UserSolution) Soltuion will not delete.

  • Wednesday, September 07, 2011 6:04 AM
     
     

    I have a very weird issue; I templated a Meeting Workspace so it has become a Site Collection Solution. Upon doing so, I deleted the Site that the Meeting Workspace was templated from, and since then, I ""de-actviate" nor delete the solution. I have tried going through Powershell, getting the object and using some of the methods to try and remove it or even set properties on the object (aswell as the uninstall-spusersolution) command, but no luck.

     

    The error below is what I get when i try to deactivate it, I get the same error in both Powershell and in the GUI:

     

    Unable to access web scoped feature (Id: f4cab110-0f65-4976-81df-11031344d9d1) because it references a non-existent or broken web (Id: 2825abfb-205b-4276-b425-b6767d8bb86f) on site 'http://workspace'.  Exception: System.ArgumentException: Value does not fall within the expected range.
       at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
       at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)

     

     

    ULS Error:

    System.ArgumentException: Value does not fall within the expected range.

    at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)

    at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)

     

     

     

     

    Any help would be greatly appreciated.

Answers

  • Tuesday, January 10, 2012 9:40 AM
     
     Answered

    Hey Henry,

     

    I installed the December CU on preproduction and production environments a fortnight ago and tested the solution deactivate and delete of the web site solution from the Site Collection and it worked so I can only assume it was added in with the December CU although it is not mentioned in the December 2011 CU's release notes.

    • Marked As Answer by Trent Nesic Tuesday, January 10, 2012 9:40 AM
    •  

All Replies

  • Wednesday, September 07, 2011 6:40 AM
     
     

    Hi!

    Have you tried using the traditional stsadm command to deactivate and remove the solution? Sometimes they work when neither powershell or central admin does the job.

    stsadm -o retractsolution -name ... -immediate -allcontenturls

    stsadm -o execadmsvcjobs

    stsadm -o deletesolution -name ...

    And don't forget to run an iisreset /noforce after.

  • Monday, September 19, 2011 9:39 PM
     
     

    Hey Nils,

     

    Thank you for your response, but it did not fix the issue. A support request was logged to Microsoft and iti s a known issue and should (not officially confirmed) be fixed in the December Cumulative Update. When templating a site, it keeps reference to the web id o the SharePoint site it was created from. When you delete the original site the template was created from and you try to deactivate the solution an exception error is thrown relating to the web id of the sharepoint  site cannot be found in which will be fixed as explained previously in the December CU. The exception error is thrown regardless if you use STSADM, Powershell or the GUI.

    We did fix this issue by restoring the deleted site (hence web id error was gone) and managed to then deactivate and remove the solution with no fursther issues.

    If you do not have backups that can achieve this, you can however jump into a Database table and change the delete flag on the web id which fixes the issue but it is not supported by Microsoft in any form of fashion.

     

     

    Thank You,

     

    Trent Nesic

    • Marked As Answer by Trent Nesic Monday, September 19, 2011 9:39 PM
    • Unmarked As Answer by Trent Nesic Tuesday, September 20, 2011 1:55 AM
    • Marked As Answer by Trent Nesic Tuesday, September 20, 2011 1:55 AM
    • Unmarked As Answer by Trent Nesic Tuesday, January 10, 2012 9:40 AM
    •  
  • Friday, November 11, 2011 9:33 AM
     
     

    Hi,

     

    I am facing same issue. Will you please provide details, how to delete flag on the web id from content db?

  • Monday, January 09, 2012 12:06 PM
     
     

    Hi, All

    I'm having the same problem. Site templates stored as user solutions can not be deactivated or deleted if a site created using it is modified or deleted. Apparently the fix did not come with the December 2011 hotfix. Any news on this one?

    Thank you for any tips.

     

    Henry

  • Tuesday, January 10, 2012 9:40 AM
     
     Answered

    Hey Henry,

     

    I installed the December CU on preproduction and production environments a fortnight ago and tested the solution deactivate and delete of the web site solution from the Site Collection and it worked so I can only assume it was added in with the December CU although it is not mentioned in the December 2011 CU's release notes.

    • Marked As Answer by Trent Nesic Tuesday, January 10, 2012 9:40 AM
    •  
  • Monday, January 16, 2012 4:42 PM
     
     

    Henry,

    I ran across the same issue. In my case, 1) I created a Site Template from a site, 2) created a test site from the new Site Template, and then 3) deleted the test site. After deleting the test site, I was unable to deactivate and delete the Site Template.

    In my case, the solution was to restore the site from the Site Collection Administration->Recycle Bin. Once the site was restored, then I could deactivate the Site Template and then delete it.

    Hope this helps you out.

    Jim.