473,569 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The following code IIS with WinXP SP2 but not on Windows 2003 SP1

<! -- Web.config-->
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

<! -- Web.config-->

where Configurations. ADsUsersPath is
LDAP://domain.com/ou=Users,ou=Cor porate,dc=domai n,dc=com

ds = New DirectoryEntry( Configurations. ADsUsersPath)
'creates searcher object, set filter string ... tells seacher object to look
this object in the active directory
dsSrch = New DirectorySearch er(ds)

' pull this information about the object (user object)
dsSrch.Filter = Configurations. ADsQuery ''
"(&(objectClass =user)(objectCa tegory=person)( sAMAccountName= *))"
dsSrch.Properti esToLoad.Add("s AMAccountName")
dsSrch.Properti esToLoad.Add("m ail")
dsSrch.Properti esToLoad.Add("n ame")
dsSrch.Properti esToLoad.Add("s n")
dsSrch.Properti esToLoad.Add("g ivenName")
dsSrch.Properti esToLoad.Add("t elephoneNumber" )
results = dsSrch.FindAll( ) ' commence search

on windows 2003 "results = dsSrch.FindAll( )" throws an exception "
System.Runtime. InteropServices .COMException (0x8007200A): The specified
directory service attribute or value does not exist "

I know that it is problem with the security because if give user id and
password to the ds object it works fine.

Does anyone know what I can do get the above to work with impersonation?
Jul 22 '05 #1
1 2783
Hi Marlon,

Welcome to MSDN newsgroup.
From your description, you get a security related error when performing
ADSI query (through the System.Director yServices components) in ASP.NET
webapplication, yes?

As you mentioned that you've used impersonation in your web.config, I do
think that it's likely due to the asp.net's working process identity which
didn't have the sufficent permission. To confirm this, I suggest that we
try the following things first:

1. Logon as a powerful domain account (which has the sufficient permission
to query AD) and running those ADSI quer code in a desktop/winform or
console app to see whether it works.

2. If #1 works, try using the
<identity impersonate="tr ue" userName="..." password="..." /> to
explicitly specify a powerful user account to impersonate your asp.net app
and to see whether it works.

If the above all works, we can get that it's your web appcliation 's client
user (whom is impersonated in your asp.net app) which dosn't have the
sufficient permission. Anyway, please check the above things first , if
there're any thing unclear, please feel free to post here.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Marlon" <ya********@onl ine.nospam>
| Subject: The following code IIS with WinXP SP2 but not on Windows 2003 SP1
| Date: Tue, 19 Jul 2005 10:58:27 -0400
| Lines: 35
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <u1************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| NNTP-Posting-Host: ewimail2.exhibi tworks.com 209.131.15.66
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP12.phx. gbl
| Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.genera l:46345
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| <! -- Web.config-->
| <authenticati on mode="Windows" />
| <identity impersonate="tr ue" />
|
| <! -- Web.config-->
|
| where Configurations. ADsUsersPath is
| LDAP://domain.com/ou=Users,ou=Cor porate,dc=domai n,dc=com
|
| ds = New DirectoryEntry( Configurations. ADsUsersPath)
| 'creates searcher object, set filter string ... tells seacher object to
look
| this object in the active directory
| dsSrch = New DirectorySearch er(ds)
|
| ' pull this information about the object (user object)
| dsSrch.Filter = Configurations. ADsQuery ''
| "(&(objectClass =user)(objectCa tegory=person)( sAMAccountName= *))"
| dsSrch.Properti esToLoad.Add("s AMAccountName")
| dsSrch.Properti esToLoad.Add("m ail")
| dsSrch.Properti esToLoad.Add("n ame")
| dsSrch.Properti esToLoad.Add("s n")
| dsSrch.Properti esToLoad.Add("g ivenName")
| dsSrch.Properti esToLoad.Add("t elephoneNumber" )
| results = dsSrch.FindAll( ) ' commence search
|
| on windows 2003 "results = dsSrch.FindAll( )" throws an exception "
| System.Runtime. InteropServices .COMException (0x8007200A): The specified
| directory service attribute or value does not exist "
|
| I know that it is problem with the security because if give user id and
| password to the ds object it works fine.
|
| Does anyone know what I can do get the above to work with impersonation?
|
|
|

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5632
by: hockeyove | last post by:
Hi! Little help needed... This is my environment: Server: Windows 2003 Client: Windows 2000 and Windows XP
5
3312
by: Jorg Rødsjø | last post by:
Hi I'm trying to use os.path.getmtime to check if a file has been modified. My OS is WinXP. The problem is, that when the os changes from/to daylight savings time, the result is suddenly off by 3600 seconds ie. one hour, even if the file remains the same. I've tried using win32file.GetFileTime, and it reports a consistent number,...
2
3224
by: LordBlue | last post by:
Hi, please forgive me if i'm sending this post in the wrong place, and please don't tell me to post it in another group, because if i found a better one i'd have already done it. I'm writing a thesis and i'm in real hurry. I have an old c code which i cannot compile correctly. I am using the Dev-Cpp 4 compiler. Anyway, my question is: i have...
2
1384
by: Grei | last post by:
how can i impersonate from win2000 to WinXP? in MSDN says: (gives example how to implemet it but not with win2000, and it doesn't say what to do on win2000!!!) any ideas? workarounds? Thanx! // This sample demonstrates the use of the WindowsIdentity class to impersonate a user.
1
281
by: Marlon | last post by:
<! -- Web.config--> <authentication mode="Windows" /> <identity impersonate="true" /> <! -- Web.config--> where Configurations.ADsUsersPath is LDAP://domain.com/ou=Users,ou=Corporate,dc=domain,dc=com ds = New DirectoryEntry(Configurations.ADsUsersPath)
33
2781
by: Steve | last post by:
One of our clients recently upgraded their Office version to 2003. When they tried to run our program (written in Access 2000), they ended up with the wrong data. My coworker and I have tested this problem and found that it ONLY occurs on Windows XP machines running Office 2003. The problem ends up being that ONE 1-to-1 join in ONE query...
1
1594
by: hazz | last post by:
I tried using the Visual Studio setup and deployment wizard to create an msi to install the .exe, config and .dll resource files from my winxp deve box onto a Windows 2003 server. I don't have access to that machine through vpn, I can't remote desktop. I have to send something to a colleague who has to do the installation. So far I have...
3
1869
by: Christian Nunciato | last post by:
Hi there: I'm a veteran to ASP.NET 1.1, but new to 2.0, and I'm using VS 2005. When I run the app on my local machine, using the built-in Web server, I have no problems, but deploying the site to a 2003 Server machine (which is also running several 1.1 sites) throws a persistent 404. I've looked around and found several references to the...
2
1283
by: Jason Huang | last post by:
Hi, I have Visual Studio.Net 2003 on my Windows XP PC. Now I would like to test the Visual Studio .Net 2005 on the same machine. Is it possilbe to have the VS2003 and VS2005 co-exists on the same machine in thw WinXP environment? Thanks for help.
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.