Click here to Skip to main content
15,887,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
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

 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900