Asp.net 在客户端/服务器环境中验证Sharepoint Online的用户
目前,我正在开发一个网站(供内部使用),需要从公司的SharePoint页面检索某些数据。 下面是使用的代码:Asp.net 在客户端/服务器环境中验证Sharepoint Online的用户,asp.net,authentication,sharepoint,client-server,sharepoint-online,Asp.net,Authentication,Sharepoint,Client Server,Sharepoint Online,目前,我正在开发一个网站(供内部使用),需要从公司的SharePoint页面检索某些数据。 下面是使用的代码: Using ctx As ClientContext = ClaimClientContext.GetAuthenticatedContext("https://abc.sharepoint.com") If ctx IsNot Nothing Then web = ctx.Web ctx.Load(ctx.W
Using ctx As ClientContext = ClaimClientContext.GetAuthenticatedContext("https://abc.sharepoint.com")
If ctx IsNot Nothing Then
web = ctx.Web
ctx.Load(ctx.Web)
ctx.ExecuteQuery()
End If
End Using
目前,我可以使用ClaimsClientContext对用户进行身份验证
在我的本地主机上测试。但是,在我发布网站并部署到服务器上之后,它就不起作用了。有人能告诉我如何在客户机/服务器环境中对用户进行身份验证的正确方向吗?
ClaimClientContext.GetAuthenticatedContext
应该向您显示一个表单以提供凭据吗?您好@tinamou,当我在本地测试它时,它会显示为弹出窗口。但是,当我将它部署到服务器时,当用户访问该网页时,它只会继续加载,而不会显示任何表单。