none
Error 0x80070057 while trying to open sharepoint list.

    Question

  • Hi,

    I have a WCF service that will fetch data from SharePoint list.I am getting a strange error "<nativehr>0x80070057</nativehr><nativestack></nativestack>"} while tring to get the list from the SPWeb. The following is the code I used.

      using (SPSite site = new SPSite(SPUrl))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        SPList levelinstancelist = web.GetList(ListUrl); // This line thor the error.

                     }

                }

    If I try to browse the URL via ie, it is opening.The following is the stack trace i am getting for this error.

     at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
       at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
       at Microsoft.SharePoint.SPWeb.GetList(String strUrl)

    Anybody can help me to identify this error.


    Muhammed Shakeer


    Monday, December 17, 2012 1:21 PM

Answers

All replies

  • Hi Shakeer 

    thier is similar post on the link provided below 

    http://stackoverflow.com/questions/5745353/nativehr0x80070002-nativehr-in-sharepoint-2010

    hope this can be a help to you 


    Best Regards, Ashutosh | SharePoint World

    Monday, December 17, 2012 1:48 PM
  • Sure, the stackoverflow post is similar, but there is no solution given there, either.

    In our case, we are getting this error from _layouts/AssetPortalBrowser.aspx. The symptom is that a user picks an asset, but it is not carried over to the textbox for which the user clicked on Browse (which instantiated the AssetPortalBrowser). Something very specific with the user or the user's machine seems to be causing this issue because I have been unable to reproduce. The ULS error given is just like Muhammed's, but ours is coming from SharePoint code--not custom code:

    Unexpected error resolving input Asset URL: [/subsite/Documents/something.jpg] System.ArgumentException: Value does not fall within the expected range.    
    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)    
    at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)    
    at Microsoft.SharePoint.SPWeb.GetList(String strUrl)    
    at Microsoft.SharePoint.Publishing.Internal.WebControls.GoToLocationUrl.GetObjectFromUrl(String inputUrl)

    Looking at the code for GetObjectFromUrl, the inputUrl parameter is that "/subsite/Documents/something.jpg" part. For the life of me, I can't figure out why it would have troubles in GetList.


    • Edited by PaulE Wednesday, January 07, 2015 8:41 PM clarification
    Wednesday, January 07, 2015 8:39 PM