开发者

FormsAuthentication: Whats the difference between Request.ServerVariables("AUTH_USER") and User.Identity.Name?

I have a开发者_Go百科 feeling that Request.ServerVariables("AUTH_USER") and User.Identity.Name return the same string while using FormsAuthentication.

So my question is as simple as that. Which one should i better use?


They return the same value indeed, the ServerVariables is there only for backward compatibility with legacy code. Normally you should user User.Identity.Name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜