Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 25th, 2008, 11:29 AM
Authorized User
Join Date: Jan 2004
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Default Authentication and Authorization Using AD and SQL

I have an application that is being developed for our Intranet.
Which will require authentication of users that are members in an Active Directory group; TIRES Users, TIRES Super, TIRES Admin.

Additionally, I created three SQL Application Roles, TIREAdminCRUD, TIRESuperRU, TIRESUser, with three distinct passwords.
Each group was given execute right to various stored procedures with the schema as 'dbo'.

My web.config is:
        <authentication mode="Windows"/>
        <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
      <allow users ="TIRES Users, TIRES Super, TIRES Admin"/>
<deny users="?"/>

<add name="TIREConnectionString" connectionString="Data Source=DOMAIN\INSTANCE;Initial Catalog=Tires;Integrated Security=True";providerName="System.Data.SqlClient "/>

The goal of my application is to authenticate each user which I do using the following code:
In my asp.net (VB) Page Load I have the following which is working.

Dim strAdmin As String
strAdmin = " TIRES Admin"

If (Roles.IsUserInRole(strAdmin)) Then
End If
But I am running into a problem when they try to connect to the SQL server; the following error message appears:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

How do I now authorize each user based on their assigned AD group to allow the execution of the stored procedures?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add existing AD user to AD group via ADSI? thiazi Classic ASP Basics 0 August 24th, 2007 09:27 PM
SQL authentication problems boucaner ADO.NET 7 February 11th, 2005 03:41 AM
IIS config for authentication using AD MSUser General .NET 0 March 26th, 2004 04:18 AM
SQL authentication is ASPX application saint SQL Server ASP 11 June 14th, 2003 04:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.