Login with network user

3

When I open the page I'm building, the user logged in by the network will log in to the page with that user, but without having to open a page for it, that is, my system will have to get the guy access the portal / system. I use:

VS2013 - MVC5 - Bootstrap - C # - SQL Server 2012

    
asked by anonymous 13.08.2014 / 02:01

2 answers

7

Set up your Web.config file with the following:

<system.web>
    ...
    <authentication mode="Windows"/>
    ...
</system.web>

The user can be obtained using:

HttpContext.Current.User.Identity.Name

Or simply:

User.Identity.Name

See more here: link

    
13.08.2014 / 02:25
6

If authentication goes with an Active Directory, VS Studio assists you, take a look at this tutorial to create a Single Sign On using Identity with Entity Framework.

Active Directory is a directory service implementation in the LDAP protocol that stores information about objects on a computer network and makes this information available to users and administrators of this network. (Source: Wikipedia)

Example Here: Windows Azure Active Directory

With this path of stones I developed a web app with authentication with the server where I work.

    
13.08.2014 / 23:20