none
Web part maintenance page error on new deployment RRS feed

  • Question

  • Hi Everyone,

    I am getting the following error when I drop custom web parts on a page.  This is a new environment that was created recently. The logs are not much help with just the following error...

    Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:   
     at Microsoft.SharePoint.SPFieldCollection.get_DisplayNameDict()    
     at Microsoft.SharePoint.SPFieldCollection.GetFieldByDisplayName(String strDisplayName, Boolean bThrowException)    
     at ICM_DropDownLinks.ICM_DropDown_Links.LoadDropdownValues()    

    Any suggestions would be appreciated!

    Thanks,
    Hyde


    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.

    Friday, August 23, 2019 3:10 PM

All replies

  • Can you show the code block
    Friday, August 23, 2019 3:29 PM
  • There is no code block.  It was a webpart that was created by a 3rd party years ago.  Is been chugging along fine on the old farm, but I am getting this error on the new one.

    Thanks,
    Hyde

    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.

    Friday, August 23, 2019 5:30 PM
  • Hi Hyde_311, 

    It seems this could be caused by your custom solution fails to dispose of an SPWeb object or the solution is continuing to use SharePoint objects that were generated via an SPWeb that has been disposed.

    You can enable collection of SPRequestAllocation and check.

    Enable CollectSPRequestAllocationCallStacks with PowerShell

    Similar issue posts for your reference:

    https://social.technet.microsoft.com/Forums/office/en-US/fd1da7f0-230d-401c-957c-695bbd573bd6/detected-use-of-sprequest-for-previously-closed-spweb-object?forum=sharepointadminprevious

    https://social.msdn.microsoft.com/Forums/en-US/50ce964f-94a6-4fda-abc0-caa34e7111f1/error-detected-use-of-sprequest-for-previously-closed-spweb-object-occurs-when-new-site-gallery?forum=sharepointdevelopmentprevious

    Best Regards,

    Lisa Chen 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, August 26, 2019 7:52 AM
    Moderator
  • Hi Lisa,

    Thanks for the reply.  Would the non-disposal of the objects necessarily stop the webpart from loading?  Also we are not having this issue in another environment that uses the same webparts.

    Thanks,
    Hyde


    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.


    • Edited by Hyde_311 Monday, August 26, 2019 2:57 PM added more info
    Monday, August 26, 2019 1:09 PM
  • Hi Hyde_311, 

    Can you add other web part which is not third part web part successfully in current environment? 

    Best Regards, 

    Lisa Chen 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, August 27, 2019 11:01 AM
    Moderator
  • Yes, I can. In fact several custom web parts are also working, but several are also not.  I am trying to figure out what the similarities are to the ones that are not working.

    Thanks,

    Hyde


    • Edited by Hyde_311 Wednesday, August 28, 2019 6:48 PM
    Wednesday, August 28, 2019 6:48 PM
  • Hi Hyde_311, 

    Since third party web part not working, i would suggest you redeploy the third party web part. 

    If the issue still exists, you can contact third party forum for helps, you will get more information from there and more experts there will help you.

    Best Regards, 

    Lisa Chen 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, September 3, 2019 9:16 AM
    Moderator
  • Detected use of SPRequest for previously closed SPWeb object.

    This error indicates that, Same web-parts already exist on the page in the closed status.

    Solution:

    on the page url add parameter eg. https://url?contents=1

    Delete the close webpart from the page and try again.

    Hope this helps


    Priti Arya

    Tuesday, September 3, 2019 12:40 PM
  • Hi Priti,

    There aren't any open web parts that are the same as the one with the error on the page.

    Thanks for the suggestion,
    Hyde

    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.

    Monday, September 9, 2019 7:02 PM
  • HI Lisa,

    Unfortunately the 3rd party that developed the web parts are not longer around.

    Thanks,
    Hyde

    There is nothing more difficult to take in hand, more perilous to conduct or more uncertain in its success than to take the lead in the introduction of a new order of things.

    Monday, September 9, 2019 7:03 PM