Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Check if User belongs to NT Workgroup

$
0
0

I have an ASP.net Webforms site and need to check if logged on user belongs to AD Group. I have set up Windows Authentication and this the code in web.config file.

<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<authorization>
<allow roles="DomainName\ADGroup1" />
<allow users="DomainName\JD1234, DomainName\JD1235">
<deny users="*" />
</authorization>

Only users with explicit permissions can open the home page. However a member of the NT Workgroup cannot log in. Roles is not working.

Any suggestions will be  most helpful. I have looked at explicitly checking in a web page as well  using  IPrincipal.IsInRole(“Administrator”


Viewing all articles
Browse latest Browse all 4737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>