【发布时间】:2010-10-04 04:30:06
【问题描述】:
我正在重构一个正常工作的 ASP.NET Web 应用程序以使用 ASP.NET Web 服务公开 Web 服务接口。根据Web Services authentication - best practices,通过 https 的基本身份验证是可行的方法。我们假设它是,而不是做 WS-Security、X509 等。
在 .NET 3.5/VS 2008 上,实现自定义 http 基本身份验证(非 Windows 帐户)的最简单方法是什么,例如,仅当用户名为“foo”且密码为“bar”时才接受。最后,我想要Thread.CurrentPrincipal 设置。
我是自己写HttpModule 还是更简单些?
【问题讨论】:
标签: asp.net web-services security .net-3.5 basic-authentication