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:

enter image description here


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -