Solved

DirectorySearcher credentials

Posted on 2010-08-27
1
865 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

737 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