Solved

DirectorySearcher credentials

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes some very basic things about SQL Server filegroups.
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…
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…

856 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