473,804 Members | 3,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Users FullName

The following code works fine on my development pc:
Public Shared Function GetFullName(ByV al userID As String) As String
Dim sQry As String = "WinNT://" & userID.Replace( "\", "/") & ",user"
Dim oUser As DirectoryEntry = New DirectoryEntry( sQry)

Return oUser.Propertie s("FullName").V alue.ToString
End Function

how ever it fails on the production server. It throws a Unknown Error
0x80005000, and Exception String is:

System.Runtime. InteropServices .COMException (0x80005000): Unknown error
(0x80005000) at System.Director yServices.Direc toryEntry.Bind( Boolean
throwIfFail) at System.Director yServices.Direc toryEntry.Bind( ) at
System.Director yServices.Direc toryEntry.get_A dsObject() at
System.Director yServices.Prope rtyValueCollect ion.PopulateLis t() at
System.Director yServices.Prope rtyValueCollect ion..ctor(Direc toryEntry entry,
String propertyName) at
System.Director yServices.Prope rtyCollection.g et_Item(String propertyName) at
_Default.Page_L oad(Object sender, EventArgs e)

Both machines are identical in all respects with the only difference being
the Production Server has 2 processors.

Does anyone know how to fix?

Jun 21 '06 #1
1 2673
I have resolved this issue. For those of you who need to know, I changed the
<processModel > element in the machine.config file.

The one on our production serverr read
<processModel autoConfig="tru e"/>
I changed it to
<processModel userName="SYSTE M" password="AutoG enerate"/>

I also add <identity impersonate="tr ue" /> to the web.config file. I do not
believe this made as much of a difference as the <processModel > did.
"John Daly" wrote:
The following code works fine on my development pc:
Public Shared Function GetFullName(ByV al userID As String) As String
Dim sQry As String = "WinNT://" & userID.Replace( "\", "/") & ",user"
Dim oUser As DirectoryEntry = New DirectoryEntry( sQry)

Return oUser.Propertie s("FullName").V alue.ToString
End Function

how ever it fails on the production server. It throws a Unknown Error
0x80005000, and Exception String is:

System.Runtime. InteropServices .COMException (0x80005000): Unknown error
(0x80005000) at System.Director yServices.Direc toryEntry.Bind( Boolean
throwIfFail) at System.Director yServices.Direc toryEntry.Bind( ) at
System.Director yServices.Direc toryEntry.get_A dsObject() at
System.Director yServices.Prope rtyValueCollect ion.PopulateLis t() at
System.Director yServices.Prope rtyValueCollect ion..ctor(Direc toryEntry entry,
String propertyName) at
System.Director yServices.Prope rtyCollection.g et_Item(String propertyName) at
_Default.Page_L oad(Object sender, EventArgs e)

Both machines are identical in all respects with the only difference being
the Production Server has 2 processors.

Does anyone know how to fix?

Jun 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1586
by: Jean-Francois Boisvieux | last post by:
the subject is the question, anybody could provide me a pointer on this subject ? Thanks JF
2
1394
by: Saso Zagoranski | last post by:
Hi! Here's my problem: Let's say I have 2 interfaces: interface Module1 { public void method1(); } interface Module2
1
10286
by: Rodrigo DeJuana | last post by:
Howdy, Can someone tell me how im suppsoed to do this? Im new to this and im sure im doing something stupid. Im trying to update a table. I have the sql there, and i was able to update the table if i hardcoded everything, but i would really like to use parameters. Here is my code. thank you, rodrigo
2
1987
by: Brian Henry | last post by:
I am working on a internal intranet site, and i need to make a permissions page, all the account authorization is done through AD to let them see the intranet site.. now, the permissions page i need a list of users in AD... is this possible to get a list of user names from ad? (the server is on the domain that hosts the intranet site)
0
1130
by: Patrick Olurotimi Ige | last post by:
I get username by calling "User.identity.name" when using Window Authentication for example DOMAIN/JBond. But how can i get my FULLNAME? Is there something similar to User.Identity.name apart from using LOGON_USER to get my fullname? In old ASP i call "fullname" using (GetObject)and i get for example James Bond.
0
1090
by: SR | last post by:
Suppose I have to create a dozen of users taking their data from a list Membership let me do it with the Create method, but what about Profile ? eg. I want FullName, Age (in Profile) UserId, pwd (in membership) something like (pseudocode): for each user in excel file Membership.CreateUser("john","....") // this doesn't work... ProfileCommon p = new ProfileCommon();
0
1112
by: Izzy | last post by:
Currently I use this code to display a users real name on a report when they print it. Private DomainUser As String = System.Security.Principal.WindowsIdentity.GetCurrent.Name.Replace("\", "/") Private ADEntry As New System.DirectoryServices.DirectoryEntry("WinNT://" & DomainUser) Private FullName As String = ADEntry.Properties("FullName").Value
2
1597
by: vijayasingh | last post by:
I am trying to take contacts data from out look and Synchronize with our database. I am using .net 1.1 framework. iam using following code. OLCont = MyOLList.GetLast 'CType(item, outlook.ContactItem) Do While TypeName(OLCont) <> "Nothing" OLRow = OLTable.NewRow OLRow(0) = 0 OLRow(1) = IIf(OLCont.FirstName Is Nothing, "", OLCont.FirstName) OLRow(2) =...
9
2631
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of the main floors of the main house: Part C: Gross Floor Area of the basement or cellar: Part D: Gross Floor Area of the attic:
0
9584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10583
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.