问题标签 [spcontext]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - SPContext.Current.Web.Url 返回 http 而不是 https
我开发了几个 webpart,我使用 SPContext.Current.Web.Url 来获取 web url。它在使用 hxxps://abc/ 访问站点时有效,但是当通过 IP 访问时,我得到的是 http 而不是 https。
问题: 当我访问 hxxps://172.1.25.25/ SPContext.Current.Web.Url 返回 hxxp://172.1.25.25/
当我访问 hxxps://abc/ SPContext.Current.Web.Url 返回 hxxps://abc/
我的备用访问映射
hxxp://172.1.25.25/ 内网
hxxps://172.1.25.25/ 内网
hxxp://abc/ 互联网
hxxps://abc/ 互联网
我使用了几种解决方法,我在论坛中得到了它:(没有任何效果,在此先感谢
sharepoint-2010 - Another lists on site (Sharepoint 2010)
This is a question I can't handle, so please, give me some advice.
Here is my code for getting names of all lists:
It works, all ok. But when I want to connect to my sharepoint site from the internet or from phone, this method returns different names. All of them. Can you explain to me, why does this happens and what do I need to change?
Thanks!
c# - 使用 Hightrust 加载项进行 SharePoint 访问,SharePoint 托管的自定义 WCF 服务,当前用户 NULL
我正在使用 Azure 托管的 WebSerice,它通过 ADFS 进行身份验证并创建用户访问承载令牌,以便通过提供程序托管的加载项与本地 SharePoint 进行通信。
我可以通过标准的 SharePoint REST API 调用访问 SharePoint 数据。但是,当我尝试调用托管在同一个 SharePoint 中的自定义 WCF 服务时,我没有经过身份验证,因此我在 httpcontext、spcontext、operationcontext、thread.principal 或 ServiceSecurityContext 中都没有当前用户、声明或身份.
因此,我无法使用自定义 SharePoint 托管 WCF 服务访问 SharePoint 中的数据。
如何以与 SharePoint REST API 相同的方式使用不记名访问令牌强制执行身份验证?