Solved

DirectorySearcher credentials

Posted on 2010-08-27
1
856 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
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…

685 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