Link to home
Start Free TrialLog in
Avatar of SWRO

asked on

How to filter web.config for certain users


How does one filter certain Domain users via the web.config file?

For example, let's say you have 2 domains. Domain1 and Domain2. Furthermore, UserID's are prefixed with a certain character that allows you to identify who they are. Say, ABC.  I do not have direct access to AD, so there's no chance of me just shoving them into an AD Group. I have to look at them as individual users.

Given that, I want to say GRANT everyone in Domains 1 & 2 whose UserID starts with ABC.
<allow users="Domain1\ABC*, Domain2\ABC* " />
<deny users="*">

However, VS.NET barks at me when I try this and gives me the following error...
"Authorization rule names cannot contain the '*' character."

I know that I've seen people do this before, but I am at a loss to find an example.
Avatar of YZlat
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SWRO


Yeah, I think you're right.