posts - 20,  comments - 3,  trackbacks - 0
1.要获得SHA1值不能通过FormsAuthentication.HashPasswordForStoringInConfigFile,因为它所在的命名空间System.Web.Security默认未引入,也不能通过Add Reference方式加进来。可通过System.Security.Cryptography中的SHA1CryptoServiceProvider实现。

2.FormsAuthentication.HashPasswordForStoringInConfigFile认为参数字符的默认编码方式与当前站点的requestEncoding一致。

3.Replace('-', char.MinValue)得不到正确结果,要用Replace("-", "")
posted on 2007-12-27 00:10 Jeff.Yang 阅读(103) 评论(0) 编辑 收藏