Elad Benda
Elad Benda

Reputation: 36656

authentication in web.config

I have a web.config with

<location path="MyFolder"> 
<system.web> 
<authorization> 
<allow users="MySiteUsers" /> 
</authorization> 
</system.web> 
</location>

My question is, where should I define "MySiteUsers" role ?

Upvotes: 0

Views: 214

Answers (2)

keni
keni

Reputation: 1768

According to your config, you are granting permission to a particular user "MySiteUsers", you'll then need a Membership provider. It could be as simple as defining a user in your web.config file or AspNetMembership provider etc. This is different from roles really, so if you want a role, you will need the implementation of a RoleProvider and change users to roles.

Upvotes: 0

Oded
Oded

Reputation: 498904

You need to define the MySiteUsers role in the membership storage of whatever Membership role provider you have chosen to use.

You can implement your own if wanted, but one of the most common options is the SQL Server - you can easily set this up using aspnet_regsql.exe.

Upvotes: 1

Related Questions