An operations error occurred when using windows authentication in my web app against AD.

HI, I really need someones help here.


I have a web app with Anonumous enabled and a domain user that runs
on behalf of the application against Active Directory and sql server.

Now i have to change that to Windows Authentication.

so what iv done is:
1. I have eneabled windows authentication,
2. using <identity impersonate="true"/> 
3. using <authentication mode="Windows">
4. using <deny users="?"/> and <allow users="*"/>

If i run the published web app on my dev pc logged in as "vader" evrything is ok.
But when i go to a difrent pc, logged in as "vader" and browse the web app against my dev pc
the application get problems accessing Active Directory.

the error message is : An operations error occurred.

If i put user credentials in the code when i try to access directory it will work.
FindOne(LDAP://DC=xxxx,DC=xxxx,DC=xxx,"vader","whatever");

But as i use windows authentication i should be able to use  
FindOne(LDAP://DC=xxxx,DC=xxxx,DC=xxx,null,null);
right?

This is the code im calling above:
-----------------------------------------

        public AdObject FindOne(string rootPath, string user, string password)
        {

            DirectoryEntry dir = new DirectoryEntry(rootPath, user, password, AuthenticationTypes.Secure);
            DirectorySearcher  Searcher = new DirectorySearcher(dir);
            Searcher.SearchScope = SearchScope.Subtree;
            Searcher.Filter = _filter;
            SearchResult result = Searcher.FindOne();

            if (result != null)
            {
                AdObject oAdObject = AdObjectType.GetObjectTypeByResult(result);
                this.List.Add(oAdObject);
            }
 return oAdObject;
     }
------------------------------------------

I use this to make sure what identity om actually using against my dev pc and it turnes out to be vader as it should be:

Principal.WindowsPrincipal wp = new Principal.WindowsPrincipal(Principal.WindowsIdentity.GetCurrent());
Label2.Text = wp.Identity.Name;
Label1.Text  = User.Identity.IsAuthenticated.ToString();

Can someone help me out here, please :|

0
Vader
4/9/2008 1:17:50 PM
asp.net.active-directory-ldap 2291 articles. 0 followers. Follow

1 Replies
554 Views

Similar Articles

[PageSpeed] 28

Do you run IIS on your local machine?

You must also do changes to IIS, disable anonymous access and enable integrated authentication.


If this post was useful to you, please mark it as answer. Thank you!
0
johram
4/17/2008 11:34:26 AM
Reply:

Similar Artilces:

LDAP/Active Directory
I have a problem. I have some code that I need to use to implement security policies by looking up names with certain Active Directory Groups using LDAP. The code runs fine in the Windows app but when I run it from a web app on the same computer, I get this error "The specified domain either does not exist or could not be contacted". The web app configured to not allow anonymous access and to use windows authentication. Anyone know why??? Here's the code. For the web app, I just replace the line ListBoxNames.Items.Add with Response.write Dim strLDAP As String ...

Using Active Directory in web application with Windows Authentication
I'm trying to create a web application that will be used to reset password. I've got code that will work to reset passwords if I pass in an username and password like the following:DirectoryEntry deMain = new DirectoryEntry("LDAP://Path", "Username", "Password", AuthenticationTypes.Secure); DirectorySearcher deSearch = new DirectorySearcher();deSearch.SearchRoot = deMain;deSearch.Filter = "(&(objectClass=user)(sAMAccountName=accountToReset))";deSearch.SearchScope = SearchScope.Subtree;SearchResult results = deSearch.FindOne();DirectoryEntry...

web based application using windows authentication/active directory
i am new to asp.net and in a process of developing an web application based on windows authentication.The user's name and Password are checked with the active directory. can anyone please suggest me how to do that? In IIS, enable Windows authentication and disable anonymous authentication. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue. Thank you For your reply.. i have enabled windows authentication and disabled anonymous authentication. it is doing exactly wha...

Active Directory LDAP Query using current windows user for AD login
I have the following AD LDAP query that gives me all of the users in a specific group, and it works just fine, however on Lines 3 and 10, how can I pass the authentication token of the current windows user (i.e. User.Identity.Name) to Active Directory so that the user viewing this web page is the one that is being authenticated in AD to query AD?  The web app uses Integrated Windows Authentication.  Anonymouse access is turned off (and cannot be turned on for security purposes).  All domain users are already able to query Active Directory.  I'm in a corporat...

Access denied with non-admin Active Directory account in Windows Server 2003 SP2 accessing .NET 3.5 & AjaxControlToolkit web app
Hi all, This is a little complex problem so please bare with me and please see the attached diagram.Situation: a)Our corporation have 2 networks: 1 with Active Directory and 1 with Private Area Network (PAN).b) I deployed my application to the Application Server running Windows XP Pro SP2, located in PAN. c) In my application, I need to access physical folders and MSMQ service on the File Server (connected both to LAN and PAN with 2 NICs). running Windows Server 2003 SP1 I have shared these folders for everyone in Active Directory and allow everyone to have access to MSMQ on FileServer ...

Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET
I am using the code found on microsoft site http://support.microsoft.com/default.aspx?scid=kb;en-us;326340 And when i run it I get an error: Error authenticating. Error authenticating user. A referral was returned from the server I have changed the code to specify my domain DC=MyDomain,DC=local Has anyone run into this or knows what it means? Thanks Craig Hi Craig, Its giving me the same error. Can you please tell me how u specified ur DC,LDAP etc.. For example:- Dim domainAndUsername As String = domain & "\" & username Dim entry A...

how to use Active Directory (AD) for authentication
Hi, does any expert knows how to make use of Active Directory for windows authentication. So far, based on the research that I have, I found out that we need to create a connectionString to LDAP server and create the member provider. However, I have no clue how to do it especially on the connection string. Do I need to inidicate the password any password to connect to it?   LDAP://subDomain.domain.com/ Thanks for your help.    Hi SavageRider,When you use windows authentication on ASP.NET, you don't need all that membership stuff etc. Also no ldap connections...

Windows Authentication using active directory
Dear all, I am using Windows Authentication using active directory users.And my criteria is that user must exist in a particular group of my domain not all domain users.Its working fine, When i access on same machine where application exists and takes directory to page, but when i try to access from some other machine on same domain(who also fulfill criteria)application gives exception. Regards,Imran Ghani  Imran Abdul Ghani Actuall error is "An operation error occured." Regards,Imran Ghani  Imran Abdul Ghani...

LDAP authentication using active directory
Happy Holidays. I am trying to set up bugzilla using LDAP authentication via active directory on a windows box. This setup does not seem to be covered in depth in the documentation. Does anyone have experience doing this or have a guide handy? Thanks, Brian ...

Active Directory Authentication using Web Forms.. What would you do??
I am pretty new to asp.net security / AD / ADAM - But I wanted to pose this question to see if I am thinking straight or waay too deep into it.I am currently working on a project that I plan on using forms authentication - and the users will authenticate using our Active Directory - login using their windows username and password.  I have this working.  Here is where the unsure area comes in: In my application, I want to store things relative to the user - for example... this record was last updated by..... or ....  these are all of the entries for a certain user... So in...

Use windows authentication to check in Active Directory
Hi,         I am developing a Intranet web application in ASP.NET.I have to use windows authentication to check if the user exists in the active directory.If the user exists in active directory then they are authenticated to use the application. 1.I checked the Integrated windows authentication is IIS 2.I have set the authentication mode to windows in web.config. 3.I am also able to display the user name (i.e the user name of the windows login) at page_load But I don't know how to check if that particular user exists in the active direc...

How do I authenticate user using Windows Active Directory
How do change the current authentication method to using Windows ? My community starter kit is used to serve local AD users and provide information to these group of users. How do I change the logon to be windows based ? Ok, I am going to have the solution from supppor.microsoft article number: 326340 http://support.microsoft.com/default.aspx?scid=kb;en-us;326340 Steps Write the Authentication Code Follow these steps to create a new class file named LdapAuthentication.vb: In Solution Explorer, right-click the project node, point to Add, and then click Add New Item....

active directory authentication using ldap Options
I am trying to add forms authentication to an asp.net website. I am developing locally, than publishing the site to the web server. Everthing works fine on my local machine in debug mode. I am able to call up the login page, successfully authenticate against the remote active directory database and then be re-directed to the requested page. The problem occurs when I publish the app to the web server. I call up the application and get re-directed to the login page. I enter the same credentials, but receive the following error: Unknown error (0x80005000) Development environment: I am dev...

web user authentication using Net::LDAP
------=_Part_2783_15526396.1126273227831 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I would like to use Net::LDAP module to authenticate web user against activ= e=20 directory.=20 I have done the following steps. a) Created the LDAP connection=20 b) Bind the LDAP using admin user id and password.=20 But I dont know how to authenticate the web user who uses the login page=20 (user id and password) against active directory. Please advise.=20 =20 --=20 "Swallow your pride occasionally, and console you...

Web resources about - An operations error occurred when using windows authentication in my web app against AD. - asp.net.active-directory-ldap

Authentication - Wikipedia, the free encyclopedia
Authentication (from Greek : αὐθεντικός authentikos , "real, genuine," from αὐθέντης authentes , "author") is the act of confirming the truth ...

New Tools to Optimize App Authentication
At f8, we announced a redesigned Auth Dialog and a new authentication flow to give developers more control over people’s first experience with ...

Facebook Tells Some Developers They Have 48 Hours to Fix Authentication Data Leaks
... sent an email to what it calls a “very small percentage of the developer community” informing them their apps are suspected of leaking authentication ...

Lockdown - A better two-factor authentication experience on the App Store on iTunes
Get Lockdown - A better two-factor authentication experience on the App Store. See screenshots and ratings, and read customer reviews.


Sony Authentication Power Outlet Recognizes Users and Devices #DigInfo - YouTube
Sony Authentication Power Outlet Recognizes Users and Devices DigInfo TV - http://diginfo.tv 9/3/2012 NFC & Smart WORLD 2012 Sony Authentication ...

SafeNet brings Cloud-based authentication service to A/NZ
SafeNet has released its new Cloud-based authentication service, billed as Authentication-as-a-Service, in A/NZ.

Two-factor authentication - cyber security -
Two recent hacking cases highlight how personal emails can impact overall business security through tiny weaknesses.

Digital authentication to become Google's next big focus
Streamlining the website login process a top priority, according to the company’s Australian business and consumer services manager Dan Metcalf. ...

ATO boosts service access via app and voice authentication
The ATO has announced it will extend its voice authentication system to its mobile app

Resources last updated: 12/24/2015 3:34:48 AM