1. Web.config 中要加入

<system.web>

      <authentication mode="Windows"  />

</system.web>

2. 代码中用

User.Identity.Name 获取

这样, DEBUG的时候就可以实现了。

3.Publish的时候。 要在 Disable Anonymous Access

参照:

http://support.microsoft.com/default.aspx?scid=kb;en-us;q315736&id=kb;zh-cn;q315736&sd=msdn

posted on 2009-06-05 22:53  Atom Yan  阅读(259)  评论(0)    收藏  举报