如何获得在SharePoint从ASP.NET网页验证的用户? [英] How to get the SharePoint authenticated user from an ASP.NET webpage?

查看:143
本文介绍了如何获得在SharePoint从ASP.NET网页验证的用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这样一种新的,而我仍然试图找出如何在整个事情的作品。

I am kind of new to this, and I'm still trying to figure out how the whole thing works.

我有一个SharePoint网站,我也有单独的ASP网页,它们是同一个域下,但不同的服务器。他们都验证到AD。

I have a sharepoint site, and I also have separate ASP webpages, they are under the same domain, but different servers. They both authenticate to AD.

我认为,通过同一个域下有我的网页作为SharePoint,一旦我有一个用户进行身份验证到SharePoint(Windows身份验证),我的网页将能够找到谁那是,只要他们有Windows身份验证也。但我想它不会这样的。

I thought that by having my webpages under the same domain as the sharepoint, once I had an user authenticate to sharepoint (windows authentication), my webpages would be able to find who that was, as long as they had windows authentication also. But I guess it doesn't work like that.

所以,我的主要目标是:从ASP.NET页,我希望能够从SharePoint中的身份验证信息

So, my main goal is: from an ASP.NET page, I want to be able to get the authentication info from SharePoint.

我应该怎么办?

谢谢!

推荐答案

的用户是通过与AD thier登录凭据进行身份验证。在C#ASP.Net页面,您可以从 System.Web.HttpContext.Current.User.Identity.Name

The users are authenticated by thier login credentials with AD. In a C# ASP.Net page you can get thier username from System.Web.HttpContext.Current.User.Identity.Name

您可以使用这些信息来进行Web服务调用 SharePoint用户配置文件服务为了得到该用户的详细信息的SharePoint记录。这假定用户配置文件服务安装并运行(不是给定的)。

You can use this information to make a web service call to the SharePoint User Profile Service in order to get details SharePoint records on that user. This assumes that the user profile services is installed and running (not a given).

至于身份验证信息,您将需要更具体的哪些信息。 请记住,给一个给定的AD用户的权限完全不同的是什么许可管理的SharePoint和任何你拥有的ASP.Net网站。

As for authentication information, you will need to be more specific about which information. Remember that the rights given to a given AD user differ completely between what is permissioned for SharePoint and anything you have for the ASP.Net website.

如果你想获得什么权限的特定用户的信息,您可以使用的 SharePoint权限 Web服务来获得有什么权限信息。 不幸的是,访问该Web服务需要在SharePoint服务器上提升权限。

If you are wanting to get information on what permissions a given user has, you can use the SharePoint Permissions web service to get information on what permission there are. Unfortunately, accessing that webservice requires elevated rights on the SharePoint server.

如果你只是想调整两个网站,使他们有一致的权限,你的最简单的办法是创建相关群体AD和independantly允许这些团体中的每个应用程序。

If you are just wanting to align the two sites so they have consistent permissions, your easiest bet is to create the relevant groups in AD and permission those groups independantly in each application.

这篇关于如何获得在SharePoint从ASP.NET网页验证的用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆