Last post Apr 17, 2008 04:31 AM by johram
Apr 11, 2008 08:28 AM|srachuri|LINK
I wrote this code but iam getting like eror: COMException was unhandled by user code
i dint understand wat is this error exactly can you sujjest me and.... and also i need one messagebox if user doest not exists in the LDAP directory
can anyone sujjest the code for me plz ASAP....
results = mysearcher.FindAll();
dr = dt.NewRow();
dr = key;
count = count + 1;
dr = columnvalue;
Apr 11, 2008 09:28 AM|Prashant Kumar|LINK
Can you post the stack trace of the exception? Is it an access denied exception?
Apr 11, 2008 09:45 AM|srachuri|LINK
Hi Prashant Kumar Thanxs for replaying me back..
it is giving like server is not operational...
System.Runtime.InteropServices.ComException..its like that..
and prashant can you write the code for me how i need to display message box in aspp.net whe user doese not exists.
Apr 17, 2008 04:31 AM|johram|LINK
It is most likely a permission issue.
So basically, if you create a DirectoryEntry with just a path parameter, it will try to contact the AD with your current credentials (for the running user that is). This is one of the most common problems in web environments, since then your process is running
with a local machine account (ASPNET) which has no access to the AD. So if you run this code in ASP.net, you will either have to specify credentials - or force the process to run with different credentials (configuration issue).