我有一个使用Windows身份validation的asp.net应用程序。
我在我的XP机器上安装了IIS服务器5.1,并且使用win授权很有效。 然而,我无法使用“angular色”,因为某些原因,它不与活动目录同步,我不知道如何让它同步。
你知道什么样的configuration/设置我需要IIS与AD同步吗? 当我进入网站pipe理工具,看angular色和angular色中的用户显示我没有用户。 我确实在AD中创build了安全组,并向其添加了用户,但是我没有在Web站点pipe理工具中看到它们。
非常感谢你的指导。
我目前得到这个错误:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'SqlDataSource1_Selecting' and no extension method 'SqlDataSource1_Selecting' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?) Source Error: Line 143: </ItemTemplate> Line 144: – I__ 12 mins ago </asp:FormView> Line 145: <asp:SqlDataSource ID="SqlDataSource1" runat="server" Line 146: ConnectionString="<%$ ConnectionStrings:qcvalues_testConnectionString %>" Line 147: SelectCommand="SELECT * FROM [batchinfo]" Source File: c:\Documents and Settings\agordon\My Documents\Visual Studio 2008\Projects\EnterData\EnterData\Default.aspx Line: 145 – I__
我确实遵循joel的build议,并做到了这一点:
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
如果你已经获得Windows身份validation工作,那么到活动目录的连接工作得很好。 您可能缺less的configuration点是属于web.config中的angular色提供程序:
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
这也应该让你通过调用以下方法立即访问用户所属的组:
User.IsInRole Roles.IsUserInRole
这里是MSDN文章,讨论将Windows身份validation合并到“开箱即用”的asp.net站点中。