User.Identity.Name will not be empty only when the user is authenticated. If you use Forms Authentication , this will happen when you call FormsAuthentication.SetAuthCookie . If you use integrated Windows authentication, then usually the user will be automatically authenticated when he first requests the site. Normally you should not try to access it in Application_Start . You can write your own Application_AuthenticateRequest authorization method, which runs when the security module identifies the user.
source share