Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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
  #1 (permalink)  
Old January 5th, 2006, 08:04 PM
Registered User
 
Join Date: Jan 2006
Location: Nelson, Bishopdale, New Zealand.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Belzemus Send a message via AIM to Belzemus Send a message via MSN to Belzemus Send a message via Yahoo to Belzemus
Default Active Directory and SQL Server Collaboration

Hi Folks,

I'll try to explain this best I can, I've been very frustrated as I haven't found a single article on the net, and I've been searching for 3-4 days. Perhaps Im using wrong terms, but I've decided to hit the coders forums.

I have an Active Directory Server (With Exchange), an SQL Server on another, and I have a custom application on a final server.

Now, I can get users to authenticate in the Custom application fine, but whats racking my brain is how to link user settings(preferences, etc) that would be stored in SQL Server to the authenticated user.

Someone mentioned to me using the SID of a user, as that is pretty much unique, however the problem I see, is when a user is deleted using Active Directory Users and Computers (Or some other method that isn't controlled by my application). When one is deleted, if that same user is recreated would it not clash or would there not be a possiblity of clashing and picking up the old users data? (And the fact that the data still exists in the SQL server after the account is deleted)

What I need to know is if there is any sort of way to process an Account Deletion in AD if it is done using the Users and Computers MMC snap-in.

Or any other way that I could go about to solve the problem.

Cheers,
Ben
  #2 (permalink)  
Old January 6th, 2006, 11:30 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A simple scheduled database job should do the trick. Using an LDAP provider within a SQL Server stored procedure, you can gain a list of all users from the directory.

The information can then be inserted into a temp table, compared to the data within your SQL table. Any that exist in your SQL table and not in the temp table are presumed deleted and you can mark as deleted from your SQL tables.

This should provide a solution for your problem albeit not the one your were looking for.

Cheers


Squatss



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP!!! Active Directory and SQL ddicecca ASP.NET 2.0 Professional 2 March 28th, 2007 08:21 AM
HELP!!! Active Directory and SQL ddicecca General .NET 7 March 27th, 2007 11:56 AM
HELP!!! Active Directory and SQL ddicecca C# 2005 0 March 27th, 2007 09:28 AM
Active Directory/SQL server cross domain trusts tuffnet SQL Server 2000 3 December 1st, 2005 01:11 PM





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