Solved

DirectorySearcher credentials

Posted on 2010-08-27
1
818 Views
Last Modified: 2013-12-24
Hi All,

i need to be able to specify default credentials to be used for the DirectorySearcher object

ive tried adding the credentials in web.config\appsettings but it will only seem to work if the stored credentials are the same as the currently logged on user

if i try setting to stored credentials a domain admin account i just get the following:

"Logon failure: unknown user name or bad password"

if i log on as that domain admin it works

how can i overcome this?

my site is using basic authentication to authenticate users
i've also created an account with domain admin membership that both the iis site and application pool use as their identity

Thanks in advance
0
Comment
Question by:Chrissalter
1 Comment
 
LVL 16

Accepted Solution

by:
SriVaddadi earned 500 total points
ID: 33541167
If the currently logged on user is different than your domain user, use impersonation.

Here is a link which explaines how to implement impersonation in asp.net.
http://support.microsoft.com/kb/306158
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now