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