.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

LDAP - Can't find server

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Hey people,

I would like to get a persons name from their username - a common query on forums i know, but i haven't managed to get mine working yet and any help would be appreciated.

I currently have this code that I found here: http://www.vbforums.com/showthread.php?t=612655 (Thanks Chris128)

I have adapted it from VB into VB.net. The page renders but when i enter my username into the Username textBox and hit the submit button (Which calls IsUser) I just get "The specified domain either does not exist or could not be contacted." I have tried lots of other code but I always get this response...

If anyone can help by posting links to a tutorial or another post for code that they know works, i will give it a go.


Imports System.DirectoryServices

Partial Class UserInfo
    Inherits System.Web.UI.Page

    Private Function GetRealNameFromAd(ByVal UsernameToFind As String) As String
        Using searcher As New DirectorySearcher(New DirectoryEntry())
            searcher.PageSize = 1000
            searcher.SearchScope = SearchScope.Subtree
            searcher.Filter = "(&(samAccountType=805306368)(sAMAccountName=" & UsernameToFind & "))"
            Using Results A

View Complete Post

More Related Resource Links

TSWebAccess Webpart can't find Terminal Server


a. Windows Server 2008 with TS Web Access installed and MOSS 2007

b. Windows Server 2008 R2 in Remote Desktop Services installed and configured.

The SharePoint web part is installed and I an add the web part in the site. But when I try to add the terminal server name I get:

TS Web Access was not able to access the specified terminal server. Verify that the computer account of the TS Web Access server is added to the TS Web Access Computers security group on the terminal server.

Any ideas why this is happening.  I saw other threads with the same error and no answer yet, so I guess I'm not the only one having the problem.




Costas Tsaklas - http://costas.cpstechgroup.com

Where to find the latest list of critical SQL Server fixes?

Hi, Where can I find the latest list of critical SQL Server fixes?

How can find computer accounts or computer owner via C# in active directory via ldap?

Hi any body.Is there any way to find computer owner or computer accounts in activedirectory via ldap?I wanna to know if it is possible via ldap or another way?I using c#.Thanks for any help.

Visual Studio 2010 can't find the Sharepoint Foundation 2010 Server when compiliing, Standalone vs

I'm wondering if we installed Visual Studio correctly cos when we get into Visual Studio 2010 the "Deploy as a Farm Solution" is the only available button option and the "Deploy as a Sandbox Solution" is un-selectable, grayed out, assuming the "Sandbox" solution is the "Standalone" approach? So when we go to compile a Workflow, the error message says the Sharepoint Server is not found" Could this "Deploy as Farm Solution" be a problem when we were instructed to install Sharepoint 2010 Foundation as a "Standalone" install? in other words we're trying to find out why when we go to compile a Workflow in Visual Studio 2010 that it can't find the Sharepoint Server Step 3: Install SharePoint 2010 1.  To install SharePoint Server 2010 or SharePoint Foundation 2010, open a Command Prompt window, and then type the following at the command prompt: On the Choose the installation you want page, click Standalone to install everything on one developer workstation. Thanks very much for any suggestions, ideas or pointers! BobK

Failed to find SharePoint server when using Microsoft Transporter Suite

When attempting to migrate a Lotus Domino application into MOSS 2007 using the Microsoft Transporter Suite 2007, I get the error: "Failed to find SharePoint server for URL: http://shp7/resimport".  I have installed the Transporter Suite on the SharePoint server (Windows 2003), and am running it under an account with full SharePoint admin rights.  I fill out the Target SharePoint site and Target SharePoint list boxes as directed in the Transporter console's help.  I know the site is running, as I can see it when I use http://shp7/resimport in IE from the server.  Anybody else experience this problem?

Unable to install SQL Server 2005 Express: The error is (-2146885628) Cannot find object or propert

I am installing 2 instances of SQL Server 2005 Express for 2 different accounting packages on Windows XP SP3.  I have the first installed, after much use of the forums.  The version of setup.exe was 2005.90.2047.0. I am not able to install the second, for Microsoft Office Accounting 2009, setup.exe version 2005.90.3042.0.  The error I am getting in Summary.txt is: Error String    : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The error is  (-2146885628) Cannot find object or property. Error Number    : 29503 The errorlog file for MSSQL.2 has a lengthier description: 2009-09-05 23:00:32.13 Server      Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)     Feb  9 2007 22:47:07     Copyright (c) 1988-2005 Microsoft Corporation     Express Edition on Windows NT 5.1 (Build 2600: Service Pack 3) 2009-09-05 23:00:32.31 Server      (c) 2005 Microsoft Corporation. 2009-09-05 23:00:32.31 Server      All rights reserved. 2009-09-05 23:00:32.32 Server      Server process ID is 5516. 2009-09-05 23:00:32.32 Server      Authentication mode is MIXED. 2009-09-05 23:00:32.35 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'. 2009-09-05 23:00:32.38 Server      Regi

where do find complete guide for sharepoint 2010 server object model?

where do find complete guide for sharepoint 2010 server object model?

Find '' in a table in MS SQL SERVER 2008



I need to find white spaces in my table. the table contains 35 columns, therefore, I cannot check with AND or OR operator something like this

SELECT * FROM MS_Exchange_IS WHERE (TMZDIFF != '' AND Timestamp != ''..........)

Also I don't want to use cursors as it will greatly hamper the performance of my application.

Please suggest any other option.


Any link or pointers would be helpful


Thanks in Advance,


SQL Server 2008 R2 installation error "Could not find the Database Engine startup handle."



I am unable to install SQL Server 2008 R2 Developer Edition (x86) on my Windows 2008 (32 bit) virtual machine. It fails everytime with "Could not find the Database Engine startup handle." error.

Any pointers?

Can't find the correct path on server


hello, i have developped an application localy that can browse excel files, pictures etc... and display them, the thing is, that on my PC when a user upload a picture it will be saved under local disk C:\ and to browse it i will access C:\idpicture and display it, that easly. the problem is when i deployed the application on iis 7.5 it's not working anymore giving me an error saying that the path is wrong or the name of the file is changed etc...

i have understood that i can't put it on local disk C:\ because the picture or the excel file must be shared on all the PC's, so i have created a map network drive (PUBLIC X:\) which is availble on all PC's, that way i will browse in X:\idpicture but that is not working aswell.


my question is: what is the proper path to use to access file on the server (PUBLIC X:\ or C:\) using IIS? 

ConfirmButtonExtender and ModalPopupExtender Server Control with Master Page Failed to find element


I am in the process of building a server control that contains a ConfirmButtonExtender. This is my code:

The Master Page:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="CBC_MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <asp:ContentPlaceHolder id="head" runat="server">
    <form id="form1" runat="server">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

How to find students positions Based on their marks in Microsoft Sql Server Compact?


hi everybody! i have the following table in Microsoft Sql server Compact

1  aaa        90
2  bbb        90

3  ccc        80

4  ddd       75

5  eee      75

6  fff        70

7  ggg      68

I need to obtain the following results

ID  NAME    MARKS Position
1    aaa       90         1
2    bbb       90         1

3    ccc       80         2

4    ddd      75          3  

5   eee  

Find unused objects in a SQL Server 2000 database


Hello All,

I want to know all the objects in a database which are not been used from a long period (Unused in the sense not executed from a long period; example procedures.). Could anyone show be the way of how to get it done.

Thanks in advance.

Pavan Kokkula Infosys Technologies Limited.

remote server problem ; index file cant find my layouts


hi !

i finally managed to finish my first dynamic application with Webmatrix and razor , everything works well locally.

But there are issues online.

i got an index file and a layout file.



in the index file , i've got the following code :

LayoutPage = Href("~/layouts/_layout.cshtml");

when i call the index page with


everything works

but when i try

http://mysite.com/test (without the / at the end )

the server throws this :

Server Error in '/test' Application.

The specified layout page 'test/layouts/_layout.cshtml' could not be found. The following paths have been used: ~/test/layouts/_layout.cshtml;~/Shared/test/layouts/_layout.cshtml;

it seems it cant find the layout file.

any suggestions ?

Linked Server/ LDAP connection help.



I just got assigned to a project to link two servers. The information I am trying to obtain is in a "Lawson LDAP application" and I'm transfering it to a SQL 2008 DB.

I went through the linked server wizard but I dont really understand the depth of it. 

I have the Host name, protocol, port, Base DN, User DN information.

I did some research on the Lawson software that the company is using but what Provider should be selected in the wizard for this type of program.

As you can see I'm quite lost, Any help would be greatly appreciated.

Can't find CU3 for SQL Server 2008 R2 x64?!


Several MSDN articles points to the existence of a file by the name of "SQLServer2008R2_RTM_CU3_2261464_10_50_1734_x64"

However, I am unable to find the file and am in desperate need of it. We are unable to modify any of our SQL Server Agent Jobs due to the issue here: http://support.microsoft.com/kb/2315727/!!

Here's the link to the CU3 downloads: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2261464&kbln=en-us

It contains four x64 downloads. The one we need (named above) is not present in the list. This is extremely frustrating!





SQL Server 2005 rebuild indexes find corruption or cross linked files


Does anyone know if this is a known issue? What do you do when this happens? We had to go to a good backup from 3 days prior.

From the application log it appears there were cross linked files. Is this caused by the OS or Sql Server?

Pat M


PatM Reno
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend