Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



"An operations error occurred" error message while checking User in Active Directory

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 20-03-2012
Member
 
Join Date: Feb 2012
Posts: 36
"An operations error occurred" error message while checking User in Active Directory

Last night while writing function to check User in Active Directory I was getting the error message:” An operations error occurred”. This my code :
Code:
try 
        { 
            DirectoryEntry de = new DirectoryEntry("LDAP://myDomain");

            DirectorySearcher deSearch = new DirectorySearcher(); 
            deSearch.SearchRoot = de; 


            deSearch.Filter = "(&(objectClass=user)(sAMAccountName=" + userName + "))";

            deSearch.SearchScope = SearchScope.Subtree;
Code:
SearchResult results = deSearch.FindOne(); //-->Error here

            if (results != null)
            {
                return true;
            }

            return false;
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
When I tried to run Localhost it works very well without any error message but although when I connect to other PC I am getting the error. Can anyone please help.

Reply With Quote
  #2  
Old 20-03-2012
Member
 
Join Date: Jul 2011
Posts: 231
re: "An operations error occurred" error message while checking User in Active Directory

Are you running IIS or Visual Studio, if you run Visual Studio all operation will be performed in the context of your windows user and while you deploy it to an IIS, you should configure credentials with which the AD should be accessed and this will not work properly with the box in IIS although if you change the web.config.
Reply With Quote
  #3  
Old 20-03-2012
Member
 
Join Date: May 2008
Posts: 186
re: "An operations error occurred" error message while checking User in Active Directory

Try to put your code into a COM+ component and run it with a domain user's identity, use delegation (<identity impersonate="true" />). Run the process (IIS process or ASPNET process) as a domain user. Programmatically impersonate a domain user when necessary. Just go through all this and after that let me know.
Reply With Quote
  #4  
Old 20-03-2012
Member
 
Join Date: May 2011
Posts: 293
re: "An operations error occurred" error message while checking User in Active Directory

Even I have faced this same issue and I have solved mine issue by unchecking anonymous access in the security settings for our web site in IIS and after that we won’t get any issue. Along with this I would also suggest you to check integrated security because this might be causing your web to run under the credentials.
Reply With Quote
  #5  
Old 20-03-2012
Member
 
Join Date: Oct 2011
Posts: 80
re: "An operations error occurred" error message while checking User in Active Directory

I am also getting this same issue from one week and I not able to to figure out how to deal with. I have tried the steps given above to disable anonymous and enable impersonate in the IIS but after that also I am getting the same error message when site is at box. Can anyone help on this issue.
Reply With Quote
  #6  
Old 20-03-2012
Member
 
Join Date: Nov 2011
Posts: 68
re: "An operations error occurred" error message while checking User in Active Directory

I think you need to remove the port number from the LDAP server ip address. When I read some article I have found sometime that the ports being dedicated and not being secure to process the invoke and the invoke is an set function. Along with this I would also suggest you to try to change the AppPool Identity for that application to Network Service and then you can solve your issue.
Reply With Quote
  #7  
Old 20-03-2012
Member
 
Join Date: Nov 2011
Posts: 76
re: "An operations error occurred" error message while checking User in Active Directory

I have resolved this issue by opening the IIS7 and after that clicking on the Default Application Pool. Now on the Default Application Pool click on the Advanced Settings and under that set the Identity as Network Service. Now once you are done, restart the IIS and the error would be vanished immediately.
Reply With Quote
  #8  
Old 04-04-2012
Member
 
Join Date: Feb 2012
Posts: 76
re: "An operations error occurred" error message while checking User in Active Directory

I was having the same issue. I was getting this error only after being deployed at webserver, it was working perfectly on my machine. I found that ,at server, in IIS, the Impersonation was checked with Window Authentication and by removing this impersonation in IIS, the error was gone.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: ""An operations error occurred" error message while checking User in Active Directory"
Thread Thread Starter Forum Replies Last Post
with Firefox 3.6, Error message "An error occurred, please try again later" MiltonT Technology & Internet 9 01-11-2011 04:44 PM
Battlefield 3 error message "We're sorry, an error has occurred?" Dong-Min Video Games 5 30-10-2011 06:42 AM
"An error occurred throwing an exception" message in Firefox Cedric Technology & Internet 6 19-06-2010 09:16 AM
"Directory Services cannot start" error message Harend Operating Systems 4 23-12-2009 04:01 AM


All times are GMT +5.5. The time now is 06:45 PM.