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
tola Ibironke
NA
8
2.8k
ASP.NET MVC 5 windows authentication
Sep 26 2014 10:26 AM
I want to get the user domain name, username, login and password from Active Directory in my organization intranet.
Here is my web config file:
<system.web>
<authentication mode="Windows"></authentication>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
HERE IS MY INDEX ACTION
public ActionResult Index()
{
var requestContext = new RequestContext();
string ntLogin = requestContext.HttpContext.User.Identity.Name
}
HERE IS THE ERROR I GET:
Object reference not set to an instance of an object.
What is it that I'm doing wrong. I want to get the user login and password from Active Directory in my organization intranet. What do I need to do next. Please help out.
Thanks
Reply
Answers (
2
)
how to execute T4Scaffolding Template commands using Junkin
How To Convert Pdf File Into Jpg Using Csharp