473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user

Hi,
Im using the following code to retrieve the user details from the AD server. But when i execute the code,it throws me the error. Please help me in this regards."System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. at System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObj ect() at System.DirectoryServices.DirectorySearcher.FindAll (Boolean findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindOne () at _Default.Button1_Click(Object sender, EventArgs e) in D:\workfolder\test\Default.aspx.vb:line 24 " The code im using is:

Try

Dim _groot As DirectoryEntry
Dim _gSearchResult As System.DirectoryServices.SearchResult
Dim _gDirectorySearcher As DirectorySearcher
Dim sPath As String
sPath = "LDAP://111.122.188.15:389"
_groot = New DirectoryEntry(sPath)
_gDirectorySearcher = New DirectorySearcher(_groot)
_gDirectorySearcher.Filter = ("(&(objectClass='*')(cn= '372810'))")
_gSearchResult = _gDirectorySearcher.FindOne
If _gSearchResult Is Nothing Then
Else
Label1.Text = _gSearchResult.Properties("mail")(0)
End If

Catch ex As Exception
Response.Write(ex.ToString)
End Try
Feb 19 '07 #1
1 11388
kenobewan
4,871 Expert 4TB
Where do you use a username & password. Here is an example that may help:
Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication
Feb 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
7
by: Brian Henry | last post by:
To use the SMTP mail service from System.Web.Mail do you have to have IIS installed on the client machien? I wanted my app to email any errors that may of occured to me on the clients machines in...
2
by: Doug | last post by:
I've installed ASP.NET onto our web server (Win2k/unsure of IIS version) this morning. I created a simple ASPX page in Notepad that writes out an asp:Label control to the page and dynamically...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
0
by: Yong | last post by:
I have a COM DLL written in C++ which worked fine when called from VB6. But we have now moved to Visual Studio 2005 - .NET Framework v2 and Windows XP Pro. In total there are 4 methods in this DLL...
2
by: richard.markiewicz | last post by:
Hi all I have inherited a sharepoint web part from my predecessor that is displaying an issue. It calls FindAll() to locate a specific security group, and then enumerates through the group to...
2
by: sriregu | last post by:
Hi, i am trying the exe file in .net environment and am getting the following error.Any idea how i can resolve it? System.Runtime.InteropServices.COMException (0x80040154): Class not registered ...
0
by: =?Utf-8?B?am1hZ2FyYW0=?= | last post by:
I have a Windows service written in C# that is configured to automatically start. Sometimes - maybe 20% of the time - the service fails to start due to an exception in WMI code. I haven't made my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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,...

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.