asp.net mvc 4 - .NET: User.IsInRole not working from within Visual Studio -
i have .net mvc 4 application uses windows authentication. want check whether user member of particular active directory group , if so, display additional menu option:
if(user.isinrole("wellnessadmins")) { <li> <b>@html.actionlink("admin","admin","home")</b> </li> }
when deployed server, works fine; admin link displayed. however, when launch application visual studio, admin link not displayed. local computer , server on same domain. why weird behavior?
if using iis express make sure have enabled windows authentication , disabled anonymous authentication in properties of project:
Comments
Post a Comment