参考页面:
http://www.yuanjiaocheng.net/webapi/test-webapi.html
http://www.yuanjiaocheng.net/webapi/web-api-controller.html
http://www.yuanjiaocheng.net/webapi/config-webapi.html
http://www.yuanjiaocheng.net/webapi/web-api-route.html
http://www.yuanjiaocheng.net/webapi/parameter-binding.html
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); WindowsPrincipal principal = (WindowsPrincipal)Thread.CurrentPrincipal; WindowsIdentity identity = (WindowsIdentity)principal.Identity; FastPrincipal prin = new FastPrincipal(identity); isAdmin = prin.IsInRole(WindowsBuiltInRole.Administrator);