L
Lloyd Dupont
I'm trying to understand ASP.NET 2.0 integrated
security/login/profile/etc.....
Running the Admin tool I get this added in my config file:
<membership defaultProvider="AspNetSqlProvider" />
<profile defaultProvider="AspNetSqlProvider" />
<roleManager enabled="true" defaultProvider="AspNetSqlProvider" />
<siteCounters defaultProvider="AspNetSqlProvider" />
Now I want to setup a SqlSconncetion String for the the AspNetProvider,
trying to read some documentation I read that I could do:
<roleManager defaultProvider="AspNetSqlProvider">
<providers>
<add name="AspNetSqlProvider"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=1.2.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
description=" description here "
connectionStringName="[name in <connectionStrings/>" />
</providers>
</roleManager>
due to the hierarchical nature of this declaration I guess I had to copy
paste this declaration 4 times (1 for each membership, profile, roleManager,
siteCounter), it's really cumbersome & error prone.
Isn't there a way to declare the provider somewhere once and for all, and
then just use its name in all feature, without having to declare it again
(and again)?
security/login/profile/etc.....
Running the Admin tool I get this added in my config file:
<membership defaultProvider="AspNetSqlProvider" />
<profile defaultProvider="AspNetSqlProvider" />
<roleManager enabled="true" defaultProvider="AspNetSqlProvider" />
<siteCounters defaultProvider="AspNetSqlProvider" />
Now I want to setup a SqlSconncetion String for the the AspNetProvider,
trying to read some documentation I read that I could do:
<roleManager defaultProvider="AspNetSqlProvider">
<providers>
<add name="AspNetSqlProvider"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=1.2.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
description=" description here "
connectionStringName="[name in <connectionStrings/>" />
</providers>
</roleManager>
due to the hierarchical nature of this declaration I guess I had to copy
paste this declaration 4 times (1 for each membership, profile, roleManager,
siteCounter), it's really cumbersome & error prone.
Isn't there a way to declare the provider somewhere once and for all, and
then just use its name in all feature, without having to declare it again
(and again)?