Click here to Skip to main content
13,597,463 members
Rate this:
 
Please Sign up or sign in to vote.
Hello, I want to authorize access to my Web ASP.NET MVC application only by users in MyDOMAIN (MyDOMAIN\MyUSER), and other users who don't belong to this DOMAIN can not authenticate. How to proceed ?

What I have tried:

What I wanted to do is create a HomeController.cs controller with [Authorize (Users = "MyDOMAIN\\ * ")], but I do not know what to replace * in order to take all users ?
Posted 7-Apr-17 3:33am
Updated 7-Apr-17 5:52am
Comments
Wessel Beulink 7-Apr-17 10:03am
   
Why would you ever do this? You can set authorize with rights instead.... just protect your map for all domain user?
Richard Deeming 7-Apr-17 10:11am
   
Just use Windows authentication. If you want all users in your domain to have access, don't specify the Users property on the Authorize attribute.
Saad Hamani 7-Apr-17 10:33am
   
Thanks @Richard Deeming for the reply.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.180621.3 | Last Updated 7 Apr 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100