Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello all,

Here is a question that has been bothering me a lot and I can't seem to get resolved.

I've got an IIS machine that runs an ASP.Net application. This application connects to a SQL server.
To avoid having usernames and passwords in the connection string, I've changed the Identification of the application pool to a user that has access to the SQL server, let's call is "Connector".

In this application I also perform LDAP authentication using the DirectorySearcher class.
Suddenly I realized that whenever I supply a fully qualified username to the DirectoryEntry object constructor (such as domain\username or username@domain) everything seems to work fine but whenever I only supply the username without the domain, it throws an exception.

As a bit of troubleshooting, I've changed the Identity of the application to NetworkService, and suddenly, all works fine, both with or without domain specification.

I've tried to look around a little bit and I don't get why this is happening.

The "Connector" user belongs to the "IIS_WPG" group, and he even is a local admin of the IIS machine...
I need to use the "Connector" user in the Identity.

Any ideas on how to go around this? And also quite nice to have, can someone explain to me why this is happening?

Thanks in advance,
Posted

1 solution

Hi Luis,

I suspect the user "Connector" is a local user on the IIS machine(s) only? What happens when you plugin a domain user?

(Yes, yes I know this looks like I'm clutching at straws here.)

Cheers

Manfred
 
Share this answer
 
v2
Comments
Sandeep Mewara 25-Nov-10 10:33am    
Comment from OP:
lol...

Nop... it is a domain use as well...

The structure is a bit weird and I forgot to mention that...

The Connector is part of the myDomain domain.
The user I'm trying to authenticate is part of the Sub1.myDomain domain.
The IIS machine is in Sub2.myDomain domain.
luisvaldez 25-Nov-10 10:35am    
lol... Big Grin

Nop... it is a domain use as well...

The structure is a bit weird and I forgot to mention that...

The Connector is part of the myDomain domain.
The user I'm trying to authenticate is part of the Sub1.myDomain domain.
The IIS machine is in Sub2.myDomain domain.
luisvaldez 30-Nov-10 15:01pm    
Help!!! lol...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900