简体   繁体   English

如何使Active Directory文件夹中的用户可以在ASP.NEt应用程序中看到Web窗体?

[英]How I can make that users from a Active Directory Folder can see a webform in my ASP.NEt Application?

I have built a ASP.NET Application that is for Guestconnection and this have a navigation with 我已经建立了一个用于Guestconnection的ASP.NET应用程序,该应用程序具有

  • Add User 添加用户
  • Log 日志记录
  • Help 救命

This Application will be run in our intranet (sharepoint) and I want that only user from a folder in active directory (for example guestadmin) see the navigation log. 该应用程序将在我们的Intranet(共享点)中运行,我只希望活动目录中的文件夹中的该用户(例如guestadmin)看到导航日志。

Here is my master site: 这是我的主站点:

...
<div class="cssmenu" id='cssmenu'>
                    <ul>
                       <li class='active'><a href='UserList.aspx'><span>Benutzer</span></a></li>    
                        <% if (true)
                          { %>    
                          <li><a href='log.aspx'><span>Aufzeichnung</span></a></li>               

                       <% } %>                 
                       <li ><a href='help.aspx'><span>Hilfe</span></a></li>
                    </ul>
                 </div>
...

If the authen.. user is in this ad folder than I want to get true else false. 如果authen ..用户位于此广告文件夹中,则比我想为true的错误。

我想这可以通过使用目录服务来完成,您可以在活动目录中搜索用户,然后执行所需的操作。尝试使用名称空间活动目录目录服务

Take a look at the Role Provider . 看一下角色提供者 There are a few implementations, including WindowsTokenRoleProvider . 有一些实现,包括WindowsTokenRoleProvider

Here are the basic web.config/system.web settings: 这是基本的web.config / system.web设置:

<authentication mode="Windows" />

<authorization>
  <allow roles="BUILTIN\Administrators" />
    <deny users="*" />
  </authorization>

<roleManager defaultProvider="WindowsProvider" 
  enabled="true"
  cacheRolesInCookie="false">
  <providers>
    <add
      name="WindowsProvider"
      type="System.Web.Security.WindowsTokenRoleProvider" />
  </providers>
</roleManager>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法可以根据我的asp.net Web应用程序中的活动目录组提供权限? - Is there a way i can give permissions based on the groups of active directory in my asp.net web application? 如何在我的 asp.net core 3.1 应用程序中播种用户和角色? - How can I seed users and roles in my asp.net core 3.1 application? 如何从我的 ASP.NET 核心应用程序访问来自 Azure Active Directory 的其他数据? - How do I access additional data from Azure Active Directory from my ASP.NET Core application? 如何允许已登录的用户能够直接从ASP.NET MVC应用程序下载文件 - How can I allow logged in users be able to direct download file from an ASP.NET MVC application 如何为活动目录的用户授予FTP文件夹权限 - How can I grant permissions for a FTP Folder for users of the active directory 如何在 Blazor/ASP 应用程序中唯一标识 Active Directory 来宾用户 - How can I uniquely identify Active Directory guest users in a Blazor/ASP application 在我的 asp.net 核心 MVC web 应用程序中,我如何使验证码成为必填字段 - Inside my asp.net core MVC web application how i can make the recaptcha a required field 如何在asp.net中将我的URL从QueryString重写为基于文件夹的URL - How can I rewrite my URL in asp.net from QueryString to folder based URL 如何使用ASP.NET应用程序中的XML文件中的数据填充我的DropDownList - How I can fill my DropDownList with Data from a XML File in my ASP.NET Application 如何使用 .NET 6 从我的 controller 访问文件夹目录? - How can I access a folder directory from my controller with .NET 6?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM