《WCF Unleashed》的 AzRoles 演示代码

《WCF Unleashed》的 10.3 节《使用 XSI 运用基于声明的安全》的演示代码使用了 AzRoles,按照书上的步骤安装 Windows 2003 Serivce Pack 1 Administration Tools Pack 之后,程序仍抛出运行时异常。

修改 App.config,增加 <serviceDebug includeExceptionDetailInFaults="true" /> 配置后看到了错误信息:The authorization store component is not installed.

我的操作系统是 Windows XP + SP2,根据 How To: Use Authorization Manager (AzMan) with ASP.NET 2.0 这篇文章的说明,按照如下步骤:

  1. 安装 Windows 2003 Serivce Pack 1 Administration Tools Pack 
  2. 安装 Windows 2000 Authorization Manager Runtime (实际上就是解开压缩包)
  3. 将 Microsoft.Interop.Security.AzRoles.dll 注册到 GAC

正是因为 Windows 2003 Serivce Pack 1 Administration Tools Pack 不包含 Interop,我们不得不自己手动注册一下。通过以上的步骤,我终于看到了下面这个效果,呵呵

image

posted on 2009-12-15 09:26  gucs  阅读(312)  评论(0编辑  收藏  举报

导航