Re: Problem with roles

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Michael i think i blogged something related here at:-
http://spaces.msn.com/members/naijacoder/
Hope that helps
Patrick



"Michael Persaud" <michaelsrpersaud@xxxxxxxxxxx> wrote in message
news:ufr$FnukFHA.2916@xxxxxxxxxxxxxxxxxxxxxxx
> Hi All,
>
> I am trying to get role based authentication and its not working
>
> I have set IIS to windows and removed anonymous
>
> the config file has identity impersonate=true
> winows authen
>
> my codes are:
>
> Dim ident As WindowsIdentity
>
> ident = WindowsIdentity.GetCurrent()
>
> Dim winprin As WindowsPrincipal = New WindowsPrincipal(ident)
>
> Dim role
>
> If winprin.IsInRole("domain\administrators") = True Then
>
> <code>
>
> Exit Sub
>
> End If
>
> or
>
>
>
> 'Put user code to initialize the page here
>
> If (User.IsInRole(s + "\administrators") = True) Then
>
> 'If (User.IsInRole(s + "\managers") = True) Or (User.IsInRole(s +
> "\c_users") = True) Then
>
> Else
>
> Response.Redirect("NotMember.aspx")
>
> End If
>
>
>
> none isnt working please help
>
>
>
> Michael
>
>


.



Relevant Pages

  • mixed authentication and LogonUser token in forms ticket - safe?
    ... I've implemented a mixed forms/windows authentication solution loosely based ... IIS has anonymous access enabled and also has windows integrated ... Dim ident as WindowsIdentity = New WindowsIdentity, ... and return the IntPtr, which I then stick in the forms cookie's user data: ...
    (microsoft.public.security)
  • Re: Integrated Windows Authentication (IIS 5 x Windows NT 4 Domain)
    ... "Richard Scurato Afonso" wrote in message ... > a Windows 2000 Advanced Server with IIS 5. ... > Authentication was didn't work properly. ... > Dim vs_Domain ...
    (microsoft.public.inetserver.iis.security)
  • Re: Using both Forms and Windows Security...
    ... Hello Michael, ... Since you configured the web application to use form authentication, ... | Subject: Re: Using both Forms and Windows Security... ... |> This can be done by using the location configuration section which can ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Problem with roles
    ... I am trying to get role based authentication and its not working ... I have set IIS to windows and removed anonymous ... Dim ident As WindowsIdentity ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Using both Forms and Windows Security...
    ... Hello Michael, ... Since authentication section can be defined beyond an application level, ... | Subject: Re: Using both Forms and Windows Security... ...
    (microsoft.public.dotnet.framework.aspnet.security)