|
WF提供权限控制的功能,其中包括两种方式:ActiveDirectoryRole(通过活动目录用户)和WebWorkflowRole(ASP.NET Role)。下面我以WebWorkflowRole的方式作为权限控制例子做介绍,首先需要安装aspnetdb数据库(通过运行微软提供的aspnet_regsql.exe文件);App.config文件配置如下:
<?xmlversion="1.0"encoding="utf-8" ?> <configuration> <connectionStrings> <addname="SqlServerConnection" connectionString="Integrated Security = SSPI;server=localhost\SQLExpress;database=aspnetdb" /> </connectionStrings> <system.web> <roleManagerenabled="true"defaultProvider="SqlProvider"> <providers> <addname="SqlProvider"connectionStringName="SqlServerConnection"applicationName="ConsoleAppSample" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </roleManager> </system.web> </configuration>
[1] [2] [3] [4] 下一页
|