Re: Have <authentication mode="Windows"> half working
- From: Dominick Baier [DevelopMentor] <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Mar 2006 05:56:08 +0000 (UTC)
works for me.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Here you go (this is weird):
Group name=WINDWARD\Domain Users; IsInRole=False
Group name=Everyone; IsInRole=False
Group name=BELLE\Debugger Users; IsInRole=False
Group name=BUILTIN\Administrators; IsInRole=False
Group name=BUILTIN\Users; IsInRole=False
Group name=NT AUTHORITY\INTERACTIVE; IsInRole=False
Group name=NT AUTHORITY\Authenticated Users; IsInRole=False
Group name=LOCAL; IsInRole=False
Group name=WINDWARD\Programming Users; IsInRole=False
Group name=WINDWARD\VSS Admin; IsInRole=False
Group name=WINDWARD\Marketing; IsInRole=False
Group name=WINDWARD\Marketing Users; IsInRole=False
Group name=WINDWARD\VSS Users; IsInRole=False
Group name=WINDWARD\CERTSVC_DCOM_ACCESS; IsInRole=False
bunch of other stuff too but none of it looked interesting - will post
all in a second post.
"Joe Kaplan (MVP - ADSI)" wrote:
I set up a simple test page in a vdir that only allows IWA auth and
have the default setting in web.config of Windows auth. With this
test page, I get "true" for all of the IsInRole calls. What happens
for you?
<%@ Page Language="C#" AutoEventWireup="true"
Inherits="System.Web.UI.Page"
trace="true"%>
<%@ Import namespace="System.Security.Principal" %>
<%@ Import namespace="System.Text" %>
<script runat="server" language="C#" >
void Page_Load(object sender, EventArgs e)
{
Context.Trace.Write("In Page.Load...");
StringBuilder sb = new StringBuilder();
WindowsIdentity wi = (WindowsIdentity) Context.User.Identity;
IdentityReferenceCollection sids = wi.Groups;
IdentityReferenceCollection names =
sids.Translate(typeof(NTAccount));
foreach (IdentityReference name in names)
{
sb.AppendFormat("<div>Group name={0}; IsInRole={1}</div>",
name.ToString(),
Context.User.IsInRole(name.ToString())
);
}
groups.Text = sb.ToString();
Context.Trace.Write("Leaving Page.Load...");
}
</script>
<html>
<head>
<title>Group Test Page</title>
</head>
<body>
<p>Groups for authenticated user</p>
<asp:label id="groups" runat=server/>
</body>
</html>
Joe K.
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:2CA09784-AEBE-4957-BFC9-3548362EF4F6@xxxxxxxxxxxxxxxx
Hi;
I agree with everything you said here - but the point remains that
IsInRole() is still failing inside my ASP.NET app. Any idea why?
This is driving me nuts.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
.
- Follow-Ups:
- Re: Have <authentication mode="Windows"> half working
- From: Luke Zhang [MSFT]
- Re: Have <authentication mode="Windows"> half working
- References:
- Re: Have <authentication mode="Windows"> half working
- From: David Thielen
- Re: Have <authentication mode="Windows"> half working
- Prev by Date: Re: Have <authentication mode="Windows"> half working
- Next by Date: Re: Have <authentication mode="Windows"> half working
- Previous by thread: Re: Have <authentication mode="Windows"> half working
- Next by thread: Re: Have <authentication mode="Windows"> half working
- Index(es):
Relevant Pages
|