prama
prama

Reputation: 61

ASP.NET Forms Authentication integrate with SQL Server

I have a follow scenario:

SERVER 1 - IIS6 ASP.NET Web Application with Forms Authentication on Active Directory

SERVER 2 - SQL SERVER Database

How i can integrate the security of Forms Authentication AD with SQL Server?

My objective is use Forms AD authentication and integrate the user authenticated for get data profile.

Ex: SELECT * FROM [TABLE] WHERE [TABLE].[USER] = SYSTEM_USER

Upvotes: 2

Views: 1292

Answers (2)

Alexander Beletsky
Alexander Beletsky

Reputation: 19821

You should confire your application for SQL Membership provider. Some information here:

http://technet.microsoft.com/en-us/library/cc197472(office.12).aspx

Upvotes: 1

Mitchel Sellers
Mitchel Sellers

Reputation: 63126

You can use the

User.Identity.Name

to get the username of the currently logged in user and pass that via a parameter to the database query that you use.

Upvotes: 1

Related Questions