0
votes

I want to authenticate users when trying to get an application using windows authentication. I managed to make my application run on windows authentication, but now I want to let only specific users enter. Form authentication is not good for me because I don't want nor need a login page.

So whats the best practice for filtering only specific users? How can people enter the application without the login page?

Thanks, David.

1

1 Answers

1
votes

In the xml node, add the and configuration modes. Use the users attribute to specify a comma-delimited list of user names. You can use a question mark (?) as a wildcard character that matches any user name.

<authorization>
    <allow users="username1, username2"/>
    <deny users=”?”/>
</authorization>

The above code denies access to all users except username1 and username2. FYI, you can also create roles in the system and allow role based access. Instead of the users attribute you use the roles attribute.

<authorization> 
    <allow roles="Administrators"/> 
    <deny users="*"/> 
</authorization>

Is this what you want?