メンバーシッププロバイダには、web.configファイルを使用してページレベルで認証および認可を行い、デコレータを使用するメソッドを保護する仕組みがあります。固定構成を使用していないapt.netメンバーシッププロバイダ
私はhttp://msdn.microsoft.com/en-us/library/yh26yfzy(v=VS.90).aspx
私の質問は、.configファイルのファイルや管理ができるようにSQLデータベースでそれらを持っているが、コードでこれらを保存しないことが方法である。このasp.netを使用することにはかなり新しいですいくつかの動的な方法で複数の「役割」とセキュリティを許可することができましたか?私は何を意味するかの
例:
web.configファイル:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*"/>
</authorization>
</system.web>
</configuration>
内装の方法の例スニップ:特に
[PrincipalPermission(SecurityAction.Demand, Role = "Administrators")]
[PrincipalPermission(SecurityAction.Demand, Role = "Supervisors")]
protected void UserGrid_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
、Iは実施例ここに興味がありますデータベースパーティのデータモデルパターン/プラクティスを使用して、特定のユーザの認証だけでなく認証も容易にすることができ、構成またはコード。私が知るべきである/ここに気づいているものが紛れていますか?