Authorization using active directory role provider MVC4

后端 未结 1 1564
南方客
南方客 2020-12-29 07:51

I\'m building a MVC4 application for internal use in a corporate enviroment. I use windows authentication, which works fine, but I\'m having troubles using Active Directory

相关标签:
1条回答
  • 2020-12-29 08:21

    I found which was the problem. After reading some info about the machine.config here I checked that I had the correct configuration applied already.

    Fianlly I got it working just like this:

    [Authorize(Roles = "Domain\\Group")]
    public ActionResult Create()
    {
        return View();
    }
    

    The problem was the way I typed the groups.

    I hope this can help other people.

    0 讨论(0)
提交回复
热议问题