Ayo

Ayo

  • NA
  • 1k
  • 0

Authentication and Authorization of Users In Active Directory and Application Roles (SQL)

Nov 24 2008 12:14 PM

My application is composed of users located in three Active Diretory groups, TIRES Users, TIRES Super, TIRES Admin.  Using the following code I can determine which of the three groups a user to the application is assigned to.
Dim strAdmin As String
strAdmin = " TIRES Admin"

If (Roles.IsUserInRole(strAdmin)) Then
'continue
Else
Response.Redirect(http://tires/home.asp)
End If

*********
The next step I undertook was to create three SQL Application Roles, TIREAdminCRUD, TIRESuperRU, TIRESUser.
Each group were given execute right to various stored procedures with the schema as 'dbo'.

********* 
How now do I, in the Page_Load Event, utilizing Roles.IsUserInRole(strAdmin)) , determine which SQL Application Roles the user belongs to in order to have the right user execute or not execute the correct stored procedure?

*********
My web.config connection string is:
<add name="TIREConnectionString" connectionString="Data Source=DOMAIN\INSTANCE;Initial Catalog=Tires;Integrated Security=True"/>
*********
When I attempt to view the web page on our Intranet I receive the following error message:
Login failed for user 'DOMAIN\SERVER_NUMBER$'.
*********
I have read at least a dozen various web web sites over the past two weeks, at least, and tried many diffect scenaios to no avail! 

Specifically, what do I type to get this working and where? 

Thank you, greatly!!

Ayomide