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.
加载中,请稍侯......
精彩评论