Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 SharePoint 2013 提供商托管 (MVC) 应用程序已部署到 Azure 网站。但是,一旦它调用 SharePoint CSOM,它就会因意外错误而失败。
知道为什么吗?
谢谢!
当您使用 url(例如“xxx.azurewebsites.net”)直接向网站发出请求时会发生这种情况,因为在您的“索引”中 ActionMethod 标记为:
[SharePointContextFilter]
如果您想从 Sharepoint 外部访问您的网站,您可以在您的 Provider App 中拥有两个控制器。一个配置 ClientWebPart 如何从 Sharepoint 内部访问,另一个配置外部访问。