TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
oga
NA
19k
0
web page and Active directory
Jan 10 2006 8:28 PM
I've tried using the Environment class, but the UserName property returns ASPNET, the windows user that started the thread. I've tried other combinations, such as using a WindowsIdentity to populate a WindowsPrincipal object, but with the same end result. I would like to get the %USERNAME% environment variable to transparently identify the current user of an intranet app. I'd like to do this without authenticating the user, as they would already have logged in to our intranet to use their computer. solution? i allways get "ASPNET' user , but in win application I get "Ognjen" ognjen is a logon user, enyone ??????? here is a class that i am using it to get user : using System; using System.Windows.Forms; using System.ComponentModel; namespace SysInfoLib { public class SysInfo : Component { public SysInfo() { } public string UserName() { return SystemInformation.UserName; } } } and then i create a object in web application something like this: SysInfo faca = new SysInfo(); Response.Write(faca.UserName);//here i get a "ASPNET" insted of "Ognjen"
Reply
Answers (
0
)
Visual Basic Syntax
Creat a word application and use find and replace