【问题标题】:SPErrorInfo - The app <appid> does not have an endpoint or its endpoint is not validSPErrorInfo - 应用程序 <appid> 没有端点或其端点无效
【发布时间】:2015-03-10 15:29:39
【问题描述】:

我使用 ASP.NET 网络表单创建了一个 SharePoint 提供程序托管应用程序。我正在尝试访问安装了该应用程序的 SharePoint 网站中的列表。当我尝试获取 clientContext 时:

var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
using (var clientContext = spContext.CreateAppOnlyClientContextForSPHost())
        {
            Web web = clientContext.Web;

            clientContext.Load(web);
            clientContext.ExecuteQuery();

            ListCollection listOfLists = web.Lists;
            clientContext.Load<ListCollection>(listOfLists);
            clientContext.ExecuteQuery();
        }

我在 clientContext.ExecuteQuery() 行收到 401 未授权错误。

当我在 Fiddler 中检查 appredirect.aspx 调用时,我没有 SPAppToken,并且 SPErrorInfo 显示为 The app &lt;appid&gt; does not have an endpoint or its endpoint is not valid

我无法找到有关此错误消息的任何信息,或在何处设置/检查端点,甚至它所指的端点。如何开始解决此问题?

【问题讨论】:

    标签: c# asp.net sharepoint sharepoint-2013


    【解决方案1】:

    您可能需要为提供商托管的应用启用 Windows 身份验证,禁用匿名身份验证。

    【讨论】:

      猜你喜欢
      • 2013-06-10
      • 1970-01-01
      • 2020-08-30
      • 2014-05-18
      • 1970-01-01
      • 2013-09-04
      • 2018-08-11
      • 2023-03-19
      • 1970-01-01
      相关资源
      最近更新 更多