?
Solved

DirectorySearcher credentials

Posted on 2010-08-27
1
Medium Priority
?
890 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 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 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