| re: IsInRole always false
"JIM.H." <JIMH@discussions.microsoft.com> wrote in message
news:C3815887-ADBB-4BF3-8890-8246D6742CC3@microsoft.com...[color=blue]
> Hi Dale,
> User.Identity.Name returns "myDomain\myUseranme"
> but both User.IsInRole("MyDomain\Administrator") and[/color]
User.IsInRole("BUILTIN\Administrator") returns false[color=blue]
> any Idea?[/color]
Did you try doubling the "\"?
--
John Saunders
johnwsaundersiii at hotmail
[color=blue]
> "Dale" wrote:
>[color=green]
> > Is username returning a local machine administrator rather than domain
> > administrator? Since you didn't specify that username is
> > myDomain\Administrator, it isn't clear. If the user is a domain
> > administrator, it should work just like you have it.
> >
> > Dale Preston
> > MCAD, MCSE, MCDBA
> >
> >
> > "JIM.H." <JIMH@discussions.microsoft.com> wrote in message
> > news:B25B7615-D84F-4D50-9A06-4CB72586FF07@microsoft.com...[color=darkred]
> > > Hello,
> > > username=user.identity.name
> > > trueFalse=User.IsInRole("myDomain\Administrators") ?
> > > First line return user name as administrator but second line returns[/color]
> > false? What might be the reason? Or how does isInRole work?[color=darkred]
> > > Thanks,
> > > Jim.
> > >[/color]
> >
> >
> >[/color][/color] |