473,397 Members | 1,950 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,397 software developers and data experts.

Retrieve Domain Information

am trying to pull the user logon info in an application to use as a
security stamp when someone completes a function. So far, I am able to
retrieve the computer name. This is, however, not what I'm looking for.

For example, if Sally logs on to the domain as 'sallyJ', then I'd like
to be able to pull the logon 'sallyJ' when she clicks a button.
Here is the code I am using:
(Before declarations)
Imports System.Security
Imports System.Security.Principal.WindowsIdentity
IN a sub btnName_Click():
Dim user As String
user = GetCurrent.Name.ToString
So far, if 'sallyJ' logs onto the network and is using a PC named
'sally_PC', then I get 'sally_PC\ASPNET' when I am really wanting
'domain\sallyJ'.
I appreciate any help or direction you can give me.

Dec 6 '05 #1
5 1208
Sounds like you don't have impersonalization on. Using this makes the
service look like its running at the user so you can do stuff like
that.

Try this in your web.config file...
<system.web>
<identity impersonate="true" />
</system.web>

Dec 6 '05 #2
Thanks. I'm trying to read up on authentication and have just come
across that term. I'll try it and post back in case someone else has a
similar problem later.

Dec 6 '05 #3
I did it and got this result. 'machinename\IUSER_machinename'

Closer, but I think there is another setting I need to learn about and
implement.

Dec 6 '05 #4
Could this be due to a configuration setting in IIS? If so, what do I
need to be looking for?
Thanks

Dec 6 '05 #5
Another thing tjonsek is do you have Integrated windows Auth checked in IIS
and Anonymouse Access unchecked
Patrick

<tj*****@phenom-biz.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Could this be due to a configuration setting in IIS? If so, what do I
need to be looking for?
Thanks

Dec 7 '05 #6

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

Similar topics

5
by: Vanessa | last post by:
I have a question, is that any other way to retrieve data from another webpage besides using XML object? Because I am using XML object now but give me so much problems. If I used...
0
by: Federica | last post by:
Hi! I need some help retrieving user information in Active Directory. I have one webform with 2 textboxes 1 username and one for password. When the user load this page and insert his username and...
3
by: vaidas gudas | last post by:
How from asp.net page retrieve all information about user how using the asp.net page. Authentication type is "Windows" and the user is in the domain
2
by: Stefke | last post by:
Hi, I want to write a little application with a textbox in which I can enter a systems host name or ip address. After clicking on a button Get Info, I want to display an overview of the systems...
3
by: Bruno | last post by:
Hello Friends I have a big problem. I can't retrieve the domain name (example: contoso.com) using visual basic.net language. I'm very appreciate if anyone give me an example how can I solve...
1
by: Lyners | last post by:
What I need - To retrieve the server name that the ASP application is running on. Why - Our current intranet is on a network where we have users that are on a domain and some that are not. Using...
1
maxamis4
by: maxamis4 | last post by:
Hello folks, Here is the backgroup. I am creating an agent that can find a user in LDAP and return the last logon date. Now i am not sure if with active directory you can user the...
0
by: Salim Fadhley | last post by:
I'm looking for a method to retrieve a Windows Domain name (not a DNS Domain name). I know this can be done by simply reading an environment variable, however on the machines I need to work with...
0
by: godavemon | last post by:
I'm using urllib2 to pull pages for a custom version of a web proxy and am having issues with 404 errors. Urllib2 does a great job of letting me know that a 404 happened with the following code. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
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,...
0
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...

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.