SharePoint 2010 WebService system cannot find the file specified. (Exception from HRESULT: 0x80070002
when use webservice on SP 2010, caught an exception:
{"Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."}
"The system cannot find the file specified. (Exception from HRESULT: 0x80070002)"
Root cause:
Adding the web reference by navigating to the /_vti_bin/Lists.asmx page DOES NOT mean that this site will be the site that the queries are run on. You still have to set the URL property of the "Lists" variable I created first. Assuming that "mosslists" is the name of the web reference I just created, the following code creates a "list" object, then sets the URL property of that object:
mosslists.Lists lists = new mosslists.Lists();
lists.Url = "http:///_vti_bin/Lists.asmx";
lists.Url = "http:///_vti_bin/Lists.asmx";
So after all that talk about already setting the URL.
专注于互联网、物联网技术架构及管理
https://www.cnblogs.com/csts
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步