Basic Auth - Role Based security

From: Alan Harling (aharling_at_legis.state.il.us)
Date: 11/17/04


Date: Wed, 17 Nov 2004 08:28:51 -0600

I am having a problem with role-based security in an ASP.NET application.

Backgound info:
    Web Server - IIS 6.0, Win2K3
        Basic Auth
    Domain - W2K

When I browse to the web site I get the login dialog. I type in my useid/password and I get authenticated fine. The next thing I do in the application is to check to see if the person that was just authenticated has access to this application. So, I use the IsInRole function with a known group to see if I get back a true or false and I always get false. I have created a test harness that is testing just the piece that is not working and I have included it below.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.lblUserName.Text = User.Identity.Name()

        Me.lblAuthType.Text = User.Identity.AuthenticationType()

        Me.lblIsAuth.Text = IIf(User.Identity.IsAuthenticated, "True", "False")

End Sub

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        Me.lblInGroup.Text = IIf(User.IsInRole(Me.txtGroup.Text), "True", "False")

End Sub

I am entering the group name in the format: "domain\group". I have tried groups that are setup as local and global and neither has worked.

Any help would be apprcieated.....Thanks.



Relevant Pages

  • Re: Basic Auth - Role Based security
    ... I am having a problem with role-based security in an ASP.NET application. ... Web Server - IIS 6.0, ... Private Sub Page_Load(ByVal sender As System.Object, ...
    (microsoft.public.inetserver.iis.security)
  • Irgendwie hängt hier was(Grafik)
    ... ich habe ein UserControl, dass ich dreimal instanziere. ... Public Event X_Changed(ByVal sender As Object, ... Private myZ As Single ... Private Sub FRM_XYZ_MouseMove(ByVal sender As Object, ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: BindingSource.EndEdit - Not updating underlying data source
    ... Const SaveButtonText As String = "Save Zone" ... Catch ex As Exception ... Private Sub frmZones_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Add Code to the AxWindowsMediaPlayer Controls
    ... that button to play the contents within the listbox? ... it possible for AxWindowsMediaPlayer Next and Previous ... Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As ...
    (microsoft.public.windowsmedia.sdk)
  • Re: DataGridView--after sorting
    ... Dim pkValue As Object ... Private Sub DataGridView1_MouseClick(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.windowsforms)